Skip to content

Commit a101405

Browse files
authored
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.
2 parents 9241614 + 5d5a964 commit a101405

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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)