From: Zdenek Dohnal Date: Wed, 3 Dec 2025 15:12:54 +0000 (+0100) Subject: conf.c: Fix stopping scheduler on unknown directive X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d5a964808fb968b707298399bb4dc3320757e85;p=thirdparty%2Fcups.git conf.c: Fix stopping scheduler on unknown directive 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. --- diff --git a/scheduler/conf.c b/scheduler/conf.c index 33bbf0514f..7d7e4e6d88 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -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)