]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
backend/usb-libusb.c: Use 60s timeout for reading at backchannel
authorZdenek Dohnal <zdohnal@redhat.com>
Tue, 13 Apr 2021 13:44:14 +0000 (15:44 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Tue, 13 Apr 2021 13:56:30 +0000 (15:56 +0200)
Some older models malfunction if timeout is too short.

CHANGES.md
backend/usb-libusb.c

index d668fba6e51c2a66c6098b4b14eb4c8067432c6b..b52237bf6b9886b703b8148ad7a0b05e814751c3 100644 (file)
@@ -45,6 +45,7 @@ CUPS v2.4rc1 (Pending)
 - Removed support for the (long deprecated and unused) `FontPath`,
   `LPDConfigFile`, `KeepAliveTimeout`, `RIPCache`, and `SMBConfigFile`
   directives in `cupsd.conf` and `cups-files.conf`.
+- Use 60s timeout for reading at backchannel (Issue #160)
 
 
 CUPS v2.3.3op2 (February 1, 2021)
index d6b0eb423249732a71ff9fa83160ca98e6a1919a..fbb0d9d897466852ea8cdbe98a7d2347cb699290 100644 (file)
@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
     readstatus = libusb_bulk_transfer(g.printer->handle,
                                      g.printer->read_endp,
                                      readbuffer, rbytes,
-                                     &rbytes, 250);
+                                     &rbytes, 60000);
     if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
     {
       fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);