pdancak / rpms / cups

Forked from rpms/cups 2 years ago
Clone
2dc0cce
From c37d71b1a31d26a4790166e2508822b18934a5c0 Mon Sep 17 00:00:00 2001
2dc0cce
From: Zdenek Dohnal <zdohnal@redhat.com>
2dc0cce
Date: Tue, 13 Apr 2021 15:44:14 +0200
2dc0cce
Subject: [PATCH] backend/usb-libusb.c: Use 60s timeout for reading at
2dc0cce
 backchannel
2dc0cce
2dc0cce
Some older models malfunction if timeout is too short.
2dc0cce
---
2dc0cce
 CHANGES.md           | 1 +
2dc0cce
 backend/usb-libusb.c | 2 +-
2dc0cce
 2 files changed, 2 insertions(+), 1 deletion(-)
2dc0cce
2dc0cce
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
2dc0cce
index d6b0eb423..fbb0d9d89 100644
2dc0cce
--- a/backend/usb-libusb.c
2dc0cce
+++ b/backend/usb-libusb.c
2dc0cce
@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
2dc0cce
     readstatus = libusb_bulk_transfer(g.printer->handle,
2dc0cce
 				      g.printer->read_endp,
2dc0cce
 				      readbuffer, rbytes,
2dc0cce
-				      &rbytes, 250);
2dc0cce
+				      &rbytes, 60000);
2dc0cce
     if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
2dc0cce
     {
2dc0cce
       fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);
2dc0cce
-- 
2dc0cce
2.26.3
2dc0cce