]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
conf.c: Fix stopping scheduler on unknown directive 1443/head
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 3 Dec 2025 15:12:54 +0000 (16:12 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 3 Dec 2025 15:12:54 +0000 (16:12 +0100)
Change the return value to do not trigger stopping the scheduler in case
of unknown directive, because stopping the scheduler on config errors
should only happen in case of syntax errors.

scheduler/conf.c

index 33bbf0514fa85d2c43c03955f938914dd3bfbdad..7d7e4e6d88d0ebc8f462438c9aea8faa444c8447 100644 (file)
@@ -2772,16 +2772,16 @@ parse_variable(
   {
    /*
     * Unknown directive!  Output an error message and continue...
+    *
+    * Return value 1 is on purpose - we ignore unknown directives to log
+    * error, but do not stop the scheduler in case error in configuration
+    * is set to be fatal.
     */
 
-    if (!value)
-      cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value for %s on line %d of %s.",
-                     line, linenum, filename);
-    else
-      cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
-                     line, linenum, filename);
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
+                   line, linenum, filename);
 
-    return (0);
+    return (1);
   }
 
   switch (var->type)