We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The printer(s) cannot be loaded from the state file again after restart pappl
To Reproduce Steps to reproduce the behavior:
Expected behavior The pappl can load the printers from the state file again.
System Information:
Additional context In the papplSystemSaveState() file, 6 options are saved for a printer.
num_options = cupsAddIntegerOption("id", printer->printer_id, num_options, &options); num_options = cupsAddOption("name", printer->name, num_options, &options); num_options = cupsAddOption("did", printer->device_id ? printer->device_id : "", num_options, &options); num_options = cupsAddOption("uri", printer->device_uri, num_options, &options); num_options = cupsAddOption("driver", printer->driver_name, num_options, &options); if (system->options & PAPPL_SOPTIONS_MULTI_QUEUE) num_options = cupsAddIntegerOption("state", (int)printer->state, num_options, &options);
But in the papplSystemLoadState(), the printer is skipped when it's option number is not equal to 5.
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) { papplLog(system, PAPPL_LOGLEVEL_ERROR, "Bad printer definition on line %d of '%s'.", linenum, filename); break; }
The text was updated successfully, but these errors were encountered:
Fix loading of previous state (Issue #298)
dc8e97b
3a3c1e9
[master dc8e97b] Fix loading of previous state (Issue #298)
[v1.4.x 3a3c1e9] Fix loading of previous state (Issue #298)
Sorry, something went wrong.
michaelrsweet
No branches or pull requests
Describe the bug
The printer(s) cannot be loaded from the state file again after restart pappl
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The pappl can load the printers from the state file again.
System Information:
Additional context
In the papplSystemSaveState() file, 6 options are saved for a printer.
But in the papplSystemLoadState(), the printer is skipped when it's option number is not equal to 5.
The text was updated successfully, but these errors were encountered: