Skip to content

Commit

Permalink
Fix loading of previous state (Issue #298)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Oct 14, 2023
1 parent 5909957 commit dc8e97b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Changes in v2.0b1
with libcups v3 (Issue #221)
- Fixed potential crash while listing devices (Issue #296)
- Fixed potential deadlock issue (Issue #297)
- Fixed loading of previous state (Issue #298)
2 changes: 1 addition & 1 deletion pappl/system-loadsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ papplSystemLoadState(
pappl_printer_t *printer; // Current printer


if ((num_options = cupsParseOptions(value, 0, &options)) != 5 || (printer_id = cupsGetOption("id", num_options, options)) == NULL || strtol(printer_id, NULL, 10) <= 0 || (printer_name = cupsGetOption("name", num_options, options)) == NULL || (device_id = cupsGetOption("did", num_options, options)) == NULL || (device_uri = cupsGetOption("uri", num_options, options)) == NULL || (driver_name = cupsGetOption("driver", num_options, options)) == NULL)
if ((num_options = cupsParseOptions(value, 0, &options)) == 0 || (printer_id = cupsGetOption("id", num_options, options)) == NULL || strtol(printer_id, NULL, 10) <= 0 || (printer_name = cupsGetOption("name", num_options, options)) == NULL || (device_id = cupsGetOption("did", num_options, options)) == NULL || (device_uri = cupsGetOption("uri", num_options, options)) == NULL || (driver_name = cupsGetOption("driver", num_options, options)) == NULL)
{
papplLog(system, PAPPL_LOGLEVEL_ERROR, "Bad printer definition on line %d of '%s'.", linenum, filename);
break;
Expand Down

0 comments on commit dc8e97b

Please sign in to comment.