]> 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:30 +0000 (07:53 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Fri, 17 May 2019 11:53:30 +0000 (07:53 -0400)
CHANGES.md
backend/usb-libusb.c

index 04dd392568622de75e29a18adf4cf2181a5924c2..a01436ccacbf18e7dd6d1fc3e827934090231eb3 100644 (file)
@@ -1,12 +1,12 @@
-CHANGES - 2.3rc1 - 2019-05-15
+CHANGES - 2.3rc1 - 2019-05-17
 =============================
 
 
 Changes in CUPS v2.3rc1
 -----------------------
 
-- The `cups-config` script no longer puts non-CUPS libraries when they are not
-  needed (Issue #5261)
+- The `cups-config` script no longer adds extra libraries when linking against
+  shared libraries (Issue #5261)
 - The supplied example print documents have been optimized for size
   (Issue #5529)
 - The `cupsctl` command now prevents setting "cups-files.conf" directives
@@ -14,8 +14,8 @@ Changes in CUPS v2.3rc1
 - The "forbidden" message in the web interface is now explained (Issue #5547)
 - The footer in the web interface covered some content on small displays
   (Issue #5574)
-- The `cups-config` script no longer adds extra libraries when linking against
-  shared libraries (Issue #5261)
+- The libusb-based USB backend now enforces read limits, improving print speed
+  in many cases (Issue #5583)
 - The `ippeveprinter` command now looks for print commands in the "command"
   subdirectory.
 - The `ipptool` command now supports `$date-current` and `$date-start` variables
index 7ec9a6d6e0a2cc21a376a0215ccccd486660847b..87606ac13045f70a8d7191d7c0ca958e22da19cf 100644 (file)
@@ -1,9 +1,10 @@
 /*
  * LIBUSB interface code for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2019 by Apple Inc.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -1742,8 +1743,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, <))