[cups.bugs] [LOW] STR #2664: usb backend busy-loops due to runloop logic error

twaugh.redhat twaugh at redhat.com
Wed Jan 9 08:07:09 PST 2008


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

A logic error in backend/runloop.c causes the usb backend to use very much
more power than it needs to.

The situation that triggers this is that backendRunLoop() is entered with
use_bc==0 and side_cb!=NULL.

When print_bytes==0 in this situation, I think that this piece of code:

     if (print_bytes || !use_bc)
       FD_SET(device_fd, &output);

is trying to add device_fd to the output set if the select() call will be
skipped.  This worked up until revision 6170, which added the side_cb
parts.

A patch to fix the logic error is attached.  Original bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=426653

Link: http://www.cups.org/str.php?L2664
Version: 1.3.5
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cups-runloop.patch
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20080109/ee9b65c7/attachment.ksh>


More information about the cups-devel mailing list