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

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