]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix lpadmin with cupsIPPSupplies and cupsSNMPSupplies (Issue #5610)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 13:27:32 +0000 (09:27 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 13:27:32 +0000 (09:27 -0400)
CHANGES.md
systemv/lpadmin.c

index 3daf60e29e4a07d99c83bd63b3de55422fa444a7..163a87b58c304defdb187b6691d2ae620535eccc 100644 (file)
@@ -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)
index cb9a9ba8197a00b308a0f6c4ac2aae3ab2376782..a6964749378832cbaf033424f30e87340d61fe79 100644 (file)
@@ -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