components/cups/patches/str3809.patch
author Rich Burridge <rich.burridge@oracle.com>
Fri, 15 Jan 2016 06:30:32 -0800
changeset 5281 abf5e45362e2
parent 2220 f90102a64c23
permissions -rw-r--r--
22547960 Add TPNO link to Userland gate list webpage

See: http://www.cups.org/str.php?L3809 for details.

Index: backend/snmp-supplies.c
===================================================================
--- backend/snmp-supplies.c
+++ backend/snmp-supplies.c
@@ -373,9 +373,9 @@
   * See if we should be getting supply levels via SNMP...
   */
 
-  if ((ppd = ppdOpenFile(getenv("PPD"))) != NULL &&
-      (ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
-      ppdattr->value && strcasecmp(ppdattr->value, "true"))
+  if ((ppd = ppdOpenFile(getenv("PPD"))) == NULL ||
+      ((ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
+       ppdattr->value && strcasecmp(ppdattr->value, "true")))
   {
     ppdClose(ppd);
     return;