[MOD] STR #4098: libusb-based USB backend: Hitting busy state makes the device opening function error out without comment
Till Kamppeter <[email protected]>
| Newsgroups | gmane.comp.printing.cups.bugs |
|---|---|
| Message-ID | <[email protected]> |
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR New] Patch attached. Link: http://www.cups.org/str.php?L4098 Version: 1.5.3 _______________________________________________ cups-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/cups-bugs
usb-backend-busy-loop-fix.patch
(text/plain, 797 B)
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1163,11 +1163,13 @@
while ((errcode = libusb_claim_interface(printer->handle, number1)) < 0)
{
if (errcode != LIBUSB_ERROR_BUSY)
+ {
fprintf(stderr,
"DEBUG: Failed to claim interface %d for %04x:%04x: %s\n",
number1, devdesc.idVendor, devdesc.idProduct, strerror(errno));
- goto error;
+ goto error;
+ }
}
/*
@@ -1187,12 +1189,14 @@
< 0)
{
if (errcode != LIBUSB_ERROR_BUSY)
+ {
fprintf(stderr,
"DEBUG: Failed to set alternate interface %d for %04x:%04x: "
"%s\n",
number2, devdesc.idVendor, devdesc.idProduct, strerror(errno));
- goto error;
+ goto error;
+ }
}
}