From c37d71b1a31d26a4790166e2508822b18934a5c0 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 13 Apr 2021 15:44:14 +0200 Subject: [PATCH] backend/usb-libusb.c: Use 60s timeout for reading at backchannel Some older models malfunction if timeout is too short. --- CHANGES.md | 1 + backend/usb-libusb.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d668fba6e5..b52237bf6b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index d6b0eb4232..fbb0d9d897 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -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); -- 2.47.2