From c507739347b19f4220e42be6261b84dc2f5b4e10 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 16 Jul 2019 09:27:32 -0400 Subject: [PATCH] Fix lpadmin with cupsIPPSupplies and cupsSNMPSupplies (Issue #5610) --- CHANGES.md | 2 ++ systemv/lpadmin.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3daf60e29e..163a87b58c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,8 @@ Changes in CUPS v2.2.12 - Fixed some compatibility issues with old releases of CUPS (Issue #5587) - Fixed a bug in the scheduler job cleanup code (Issue #5588) - "make" failed with GZIP options (Issue #5595) +- The `lpadmin` command did not always update the PPD file for changes to the + `cupsIPPSupplies` and `cupsSNMPSupplies` keywords (Issue #5610) - The scheduler now uses both the group's membership list as well as the various OS-specific membership functions to determine whether a user belongs to a named group (Issue #5613) diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index cb9a9ba819..a696474937 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -1488,6 +1488,7 @@ set_printer_options( (boolval = cupsGetOption("cupsIPPSupplies", num_options, options)) != NULL) { + ppdchanged = 1; wrote_ipp_supplies = 1; cupsFilePrintf(out, "*cupsIPPSupplies: %s\n", (!_cups_strcasecmp(boolval, "true") || @@ -1498,6 +1499,7 @@ set_printer_options( (boolval = cupsGetOption("cupsSNMPSupplies", num_options, options)) != NULL) { + ppdchanged = 1; wrote_snmp_supplies = 1; cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n", (!_cups_strcasecmp(boolval, "true") || @@ -1558,6 +1560,8 @@ set_printer_options( (boolval = cupsGetOption("cupsIPPSupplies", num_options, options)) != NULL) { + ppdchanged = 1; + cupsFilePrintf(out, "*cupsIPPSupplies: %s\n", (!_cups_strcasecmp(boolval, "true") || !_cups_strcasecmp(boolval, "yes") || @@ -1568,6 +1572,8 @@ set_printer_options( (boolval = cupsGetOption("cupsSNMPSupplies", num_options, options)) != NULL) { + ppdchanged = 1; + cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n", (!_cups_strcasecmp(boolval, "true") || !_cups_strcasecmp(boolval, "yes") || @@ -1582,8 +1588,7 @@ set_printer_options( * Do the request... */ - ippDelete(cupsDoFileRequest(http, request, "/admin/", - ppdchanged ? tempfile : file)); + ippDelete(cupsDoFileRequest(http, request, "/admin/", ppdchanged ? tempfile : file)); /* * Clean up temp files... (TODO: catch signals in case we CTRL-C during -- 2.47.2