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

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