Blame SOURCES/0001-Fix-lpadmin-with-cupsIPPSupplies-and-cupsSNMPSupplie.patch

a17bb8
From 9539c53065170e97836503074e770d7b5fbf9f83 Mon Sep 17 00:00:00 2001
a17bb8
From: Michael R Sweet <michael.r.sweet@gmail.com>
a17bb8
Date: Tue, 16 Jul 2019 09:27:13 -0400
a17bb8
Subject: [PATCH] Fix lpadmin with cupsIPPSupplies and cupsSNMPSupplies (Issue
a17bb8
 #5610)
a17bb8
a17bb8
---
a17bb8
 CHANGES.md        | 2 ++
a17bb8
 systemv/lpadmin.c | 9 +++++++--
a17bb8
 2 files changed, 9 insertions(+), 2 deletions(-)
a17bb8
a17bb8
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
a17bb8
index f428368d4..ca6d386b2 100644
a17bb8
--- a/systemv/lpadmin.c
a17bb8
+++ b/systemv/lpadmin.c
a17bb8
@@ -1467,6 +1467,7 @@ set_printer_options(
a17bb8
 	  (boolval = cupsGetOption("cupsIPPSupplies", num_options,
a17bb8
 	                           options)) != NULL)
a17bb8
       {
a17bb8
+        ppdchanged         = 1;
a17bb8
         wrote_ipp_supplies = 1;
a17bb8
         cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
a17bb8
 	               (!_cups_strcasecmp(boolval, "true") ||
a17bb8
@@ -1477,6 +1478,7 @@ set_printer_options(
a17bb8
 	       (boolval = cupsGetOption("cupsSNMPSupplies", num_options,
a17bb8
 	                                options)) != NULL)
a17bb8
       {
a17bb8
+        ppdchanged          = 1;
a17bb8
         wrote_snmp_supplies = 1;
a17bb8
         cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
a17bb8
 	               (!_cups_strcasecmp(boolval, "true") ||
a17bb8
@@ -1537,6 +1539,8 @@ set_printer_options(
a17bb8
 	(boolval = cupsGetOption("cupsIPPSupplies", num_options,
a17bb8
 				 options)) != NULL)
a17bb8
     {
a17bb8
+      ppdchanged = 1;
a17bb8
+
a17bb8
       cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
a17bb8
 		     (!_cups_strcasecmp(boolval, "true") ||
a17bb8
 		      !_cups_strcasecmp(boolval, "yes") ||
a17bb8
@@ -1547,6 +1551,8 @@ set_printer_options(
a17bb8
         (boolval = cupsGetOption("cupsSNMPSupplies", num_options,
a17bb8
 			         options)) != NULL)
a17bb8
     {
a17bb8
+      ppdchanged = 1;
a17bb8
+
a17bb8
       cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
a17bb8
 		     (!_cups_strcasecmp(boolval, "true") ||
a17bb8
 		      !_cups_strcasecmp(boolval, "yes") ||
a17bb8
@@ -1561,8 +1567,7 @@ set_printer_options(
a17bb8
     * Do the request...
a17bb8
     */
a17bb8
 
a17bb8
-    ippDelete(cupsDoFileRequest(http, request, "/admin/",
a17bb8
-                                ppdchanged ? tempfile : file));
a17bb8
+    ippDelete(cupsDoFileRequest(http, request, "/admin/", ppdchanged ? tempfile : file));
a17bb8
 
a17bb8
    /*
a17bb8
     * Clean up temp files... (TODO: catch signals in case we CTRL-C during
a17bb8
-- 
a17bb8
2.31.1
a17bb8