rpms/cups/F-12 cups-str3413.patch,1.1,1.2 cups.spec,1.552,1.553

Tim Waugh twaugh at fedoraproject.org
Tue Dec 8 10:57:19 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16061

Modified Files:
	cups-str3413.patch cups.spec 
Log Message:
* Tue Dec  8 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-14
- Use upstream fix for SNMP detection (bug #542857, STR #3413).


cups-str3413.patch:
 backend/snmp.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Index: cups-str3413.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-12/cups-str3413.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- cups-str3413.patch	3 Dec 2009 10:06:20 -0000	1.1
+++ cups-str3413.patch	8 Dec 2009 10:57:19 -0000	1.2
@@ -1,6 +1,6 @@
 diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c
 --- cups-1.4.2/backend/snmp.c.str3413	2009-01-14 22:40:58.000000000 +0000
-+++ cups-1.4.2/backend/snmp.c	2009-12-03 10:01:27.933335209 +0000
++++ cups-1.4.2/backend/snmp.c	2009-12-08 10:54:11.798515550 +0000
 @@ -999,7 +999,7 @@ read_snmp_response(int fd)		/* I - SNMP 
  		       DEVICE_PRODUCT, LexmarkProductOID2);
  	_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
@@ -10,33 +10,24 @@ diff -up cups-1.4.2/backend/snmp.c.str34
  	_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
  	               packet.community, CUPS_ASN1_GET_REQUEST,
  		       DEVICE_PRODUCT, XeroxProductOID);
-@@ -1064,7 +1064,19 @@ read_snmp_response(int fd)		/* I - SNMP 
+@@ -1054,7 +1054,9 @@ read_snmp_response(int fd)		/* I - SNMP 
+ 	break;
  
- 
- 	  if (device->id)
-+	  {
-+	    if (strlen (device->id) >
-+		strlen ((char *)packet.object_value.string.bytes))
-+	    {
-+	     /*
-+	      * The Device ID we already saw was more complete.
-+	      */
-+
-+	      break;
-+	    }
-+
- 	    free(device->id);
-+	  }
- 
- 	  device->id = strdup((char *)packet.object_value.string.bytes);
- 
-@@ -1107,7 +1119,8 @@ read_snmp_response(int fd)		/* I - SNMP 
+     case DEVICE_ID :
+-	if (device && packet.object_type == CUPS_ASN1_OCTET_STRING)
++	if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&
++	    (!device->id ||
++	     strlen(device->id) < packet.object_value.string.num_bytes))
+ 	{
+ 	 /*
+ 	  * Update an existing cache entry...
+@@ -1107,7 +1109,7 @@ read_snmp_response(int fd)		/* I - SNMP 
  
      case DEVICE_URI :
  	if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&
 -	    !device->uri)
-+	    !device->uri &&
-+	    (char *)packet.object_value.string.bytes[0] != '\0')
++	    !device->uri && packet.object_value.string.num_bytes > 0)
  	{
  	 /*
  	  * Update an existing cache entry...
+diff -up cups-1.4.2/CHANGES-1.4.txt.str3413 cups-1.4.2/CHANGES-1.4.txt


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-12/cups.spec,v
retrieving revision 1.552
retrieving revision 1.553
diff -u -p -r1.552 -r1.553
--- cups.spec	8 Dec 2009 10:21:02 -0000	1.552
+++ cups.spec	8 Dec 2009 10:57:19 -0000	1.553
@@ -532,6 +532,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %changelog
 * Tue Dec  8 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-14
+- Use upstream fix for SNMP detection (bug #542857, STR #3413).
 - Use the text filter for text/css files (bug #545026, STR #3442).
 - Show conflicting option values in web UI (bug #544326, STR #3440).
 - Use upstream fix for adjustment of conflicting options




More information about the fedora-extras-commits mailing list