From: Michael R Sweet Date: Fri, 17 May 2019 11:53:42 +0000 (-0400) Subject: Enforce USB read limits (Issue #5583) X-Git-Tag: v2.2.12~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35e927f83529cd9b4bc37bcd418c50e307fced35;p=thirdparty%2Fcups.git Enforce USB read limits (Issue #5583) --- diff --git a/CHANGES.md b/CHANGES.md index af81f67f0b..616e512542 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index 7fc95c27ed..042854bba6 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -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, <))