]> 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:13 +0000 (09:27 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 13:27:13 +0000 (09:27 -0400)
CHANGES.md
systemv/lpadmin.c

index 96141157c0b158bcc8e1bce7530fd68a117e2392..aea1045b34f2e15eb8431e9386c8a52c8540174d 100644 (file)
@@ -11,6 +11,8 @@ Changes in CUPS v2.3.0
 - Removed dead code from the scheduler (Issue #5593)
 - "make" failed with GZIP options (Issue #5595)
 - Fixed a NULL pointer dereference bug in `httpGetSubField2` (Issue #5598)
+- 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 f428368d4d816d7cba6e229c80e50193de7015e3..ca6d386b2e12ebb0b51b6bf874be54144b4df714 100644 (file)
@@ -1467,6 +1467,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") ||
@@ -1477,6 +1478,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") ||
@@ -1537,6 +1539,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") ||
@@ -1547,6 +1551,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") ||
@@ -1561,8 +1567,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