Skip to content

Commit 5d5a964

Browse files
committed
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.
1 parent 14bc0e7 commit 5d5a964

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

scheduler/conf.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,16 +2772,16 @@ parse_variable(
27722772
{
27732773
/*
27742774
* Unknown directive! Output an error message and continue...
2775+
*
2776+
* Return value 1 is on purpose - we ignore unknown directives to log
2777+
* error, but do not stop the scheduler in case error in configuration
2778+
* is set to be fatal.
27752779
*/
27762780

2777-
if (!value)
2778-
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value for %s on line %d of %s.",
2779-
line, linenum, filename);
2780-
else
2781-
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
2782-
line, linenum, filename);
2781+
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
2782+
line, linenum, filename);
27832783

2784-
return (0);
2784+
return (1);
27852785
}
27862786

27872787
switch (var->type)

0 commit comments

Comments
 (0)