Skip to content

Commit

Permalink
When loading recorded print queue option settings, skip "xxx-default"
Browse files Browse the repository at this point in the history
As we stop recording "xxx-default" IPP attributes with the previous
commit we also should remove these entry from existing recordings,
which we do with this commit, simply by ignoring them when loading
recorded settings.
  • Loading branch information
tillkamppeter committed Jun 13, 2023
1 parent dfbc2dd commit 9e160bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daemon/cups-browsed.c
Original file line number Diff line number Diff line change
Expand Up @@ -6048,6 +6048,11 @@ load_printer_options(const char *printer,
printer);
while (getline(&opt, &optlen, fp) != -1)
{
// Skip "xxx-default" IPP attributes, these properties are already
// covered by the PPD defaults and we also wnat to eliminate
// "print-quality-default=0" which makes the queue not printing.
if (strstr(opt, "-default="))
continue;
if (strlen(opt) > 1 && (val = strchr(opt, '=')) != NULL)
{
*val = '\0';
Expand Down

0 comments on commit 9e160bc

Please sign in to comment.