Skip to content

Commit 277d3b1

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 42a1778 commit 277d3b1

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
@@ -2708,16 +2708,16 @@ parse_variable(
27082708
{
27092709
/*
27102710
* Unknown directive! Output an error message and continue...
2711+
*
2712+
* Return value 1 is on purpose - we ignore unknown directives to log
2713+
* error, but do not stop the scheduler in case error in configuration
2714+
* is set to be fatal.
27112715
*/
27122716

2713-
if (!value)
2714-
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value for %s on line %d of %s.",
2715-
line, linenum, filename);
2716-
else
2717-
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
2718-
line, linenum, filename);
2717+
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
2718+
line, linenum, filename);
27192719

2720-
return (0);
2720+
return (1);
27212721
}
27222722

27232723
switch (var->type)

0 commit comments

Comments
 (0)