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

Resolves: rhbz#1026914
This commit is contained in:
Tim Waugh 2013-11-28 16:44:42 +00:00
parent 2568000642
commit b14fb4956c
2 changed files with 37 additions and 1 deletions

30
cups-usb-timeout.patch Normal file
View File

@ -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)

View File

@ -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@redhat.com> - 1:1.7.0-6
- Prevent USB timeouts causing incorrect print output (bug #1026914).
* Thu Nov 14 2013 Tim Waugh <twaugh@redhat.com> - 1:1.7.0-5
- Avoid stale lockfile in dbus notifier (bug #1026949).