]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Enforce USB read limits (Issue #5583)
authorMichael R Sweet <michaelrsweet@gmail.com>
Fri, 17 May 2019 11:53:42 +0000 (07:53 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Fri, 17 May 2019 11:53:42 +0000 (07:53 -0400)
CHANGES.md
backend/usb-libusb.c

index af81f67f0b1bfa1f3246bbf4db03861706a8a880..616e51254249c1d396834f4fa43f8763718c987a 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.2.12 - 2019-05-15
+CHANGES - 2.2.12 - 2019-05-17
 =============================
 
 
@@ -17,6 +17,8 @@ Changes in CUPS v2.2.12
 - Timed out job submission now yields an error (Issue #5570)
 - The footer in the web interface covered some content on small displays
   (Issue #5574)
+- The libusb-based USB backend now enforces read limits, improving print speed
+  in many cases (Issue #5583)
 
 
 Changes in CUPS v2.2.11
index 7fc95c27ed733e3a830bbf05bad3464972c52b65..042854bba63c91b992ac7b0119142325bd1b8536 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * LIBUSB interface code for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2019 by Apple Inc.
  *
  * These coded instructions, statements, and computer programs are the
  * property of Apple Inc. and are protected by Federal copyright
@@ -1746,8 +1746,7 @@ static void *read_thread(void *reference)
     * Make sure this loop executes no more than once every 250 miliseconds...
     */
 
-    if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) &&
-        (g.wait_eof || !g.read_thread_stop))
+    if ((g.wait_eof || !g.read_thread_stop))
     {
       gettimeofday(&now, NULL);
       if (timercmp(&now, &end, <))