[cups: 1/2] Prevent USB timeouts causing incorrect print output (bug #1026914).

Tim Waugh twaugh at fedoraproject.org
Thu Nov 28 16:54:31 UTC 2013


commit b14fb4956c6bceb6def48d0fed03d7b0631f5851
Author: Tim Waugh <twaugh at redhat.com>
Date:   Thu Nov 28 16:44:42 2013 +0000

    Prevent USB timeouts causing incorrect print output (bug #1026914).
    
    Resolves: rhbz#1026914

 cups-usb-timeout.patch |   30 ++++++++++++++++++++++++++++++
 cups.spec              |    8 +++++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/cups-usb-timeout.patch b/cups-usb-timeout.patch
new file mode 100644
index 0000000..2c95e09
--- /dev/null
+++ b/cups-usb-timeout.patch
@@ -0,0 +1,30 @@
+diff -up cups-1.7.0/backend/usb-libusb.c.usb-timeout cups-1.7.0/backend/usb-libusb.c
+--- cups-1.7.0/backend/usb-libusb.c.usb-timeout	2013-07-17 16:51:43.000000000 +0100
++++ cups-1.7.0/backend/usb-libusb.c	2013-11-28 16:44:03.785124015 +0000
+@@ -496,7 +496,7 @@ print_device(const char *uri,		/* I - De
+ 	iostatus = libusb_bulk_transfer(g.printer->handle,
+ 					g.printer->write_endp,
+ 					print_buffer, g.print_bytes,
+-					&bytes, 60000);
++					&bytes, 72 * 60 * 60000);
+        /*
+ 	* Ignore timeout errors, but retain the number of bytes written to
+ 	* avoid sending duplicate data...
+@@ -519,7 +519,7 @@ print_device(const char *uri,		/* I - De
+ 	  iostatus = libusb_bulk_transfer(g.printer->handle,
+ 					  g.printer->write_endp,
+ 					  print_buffer, g.print_bytes,
+-					  &bytes, 60000);
++					  &bytes, 72 * 60 * 60000);
+ 	}
+ 
+        /*
+@@ -534,7 +534,7 @@ print_device(const char *uri,		/* I - De
+ 	  iostatus = libusb_bulk_transfer(g.printer->handle,
+ 					  g.printer->write_endp,
+ 					  print_buffer, g.print_bytes,
+-					  &bytes, 60000);
++					  &bytes, 72 * 60 * 60000);
+         }
+ 
+ 	if (iostatus)
diff --git a/cups.spec b/cups.spec
index 442d4d4..62700c1 100644
--- a/cups.spec
+++ b/cups.spec
@@ -11,7 +11,7 @@ Summary: CUPS printing system
 Name: cups
 Epoch: 1
 Version: 1.7.0
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Url: http://www.cups.org/
@@ -55,6 +55,7 @@ Patch24: cups-ricoh-deviceid-oid.patch
 Patch25: cups-systemd-socket.patch
 Patch26: cups-lpd-manpage.patch
 Patch27: cups-avahi-address.patch
+Patch28: cups-usb-timeout.patch
 Patch29: cups-enum-all.patch
 Patch30: cups-stringpool-setprinterattr.patch
 Patch31: cups-dymo-deviceid.patch
@@ -240,6 +241,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
 %patch26 -p1 -b .lpd-manpage
 # Use IP address when resolving DNSSD URIs (bug #948288).
 %patch27 -p1 -b .avahi-address
+# Prevent USB timeouts causing incorrect print output (bug #1026914).
+%patch28 -p1 -b .usb-timeout
 # Return from cupsEnumDests() once all records have been returned.
 %patch29 -p1 -b .enum-all
 # Prevent stringpool damage leading to memory leaks (bug #974048).
@@ -655,6 +658,9 @@ rm -f %{cups_serverbin}/backend/smb
 %{_mandir}/man5/ipptoolfile.5.gz
 
 %changelog
+* Thu Nov 28 2013 Tim Waugh <twaugh at redhat.com> - 1:1.7.0-6
+- Prevent USB timeouts causing incorrect print output (bug #1026914).
+
 * Thu Nov 14 2013 Tim Waugh <twaugh at redhat.com> - 1:1.7.0-5
 - Avoid stale lockfile in dbus notifier (bug #1026949).
 


More information about the scm-commits mailing list