Your message dated Thu, 18 Jan 2007 22:32:05 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#406644: fixed in libusb 2:0.1.12-3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libusb
Version: 2:0.1.12-2
Severity: normal
Tags: patch

Libusb calls select() in a loop, but does not re-initialize the fd_set.
So every call after the first one is just a delay.  This doesn't make
any difference in practice since the timeout is always 1ms, but I noticed
it while debugging another problem in our application, so here's a patch.

The symptom is, when stracing something that takes more than 1ms to respond,
you'll see a lot of calls to select where writefds is [] instead of e.g.
[3].

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20-rc3
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
---
 linux.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: libusb-0.1.12/linux.c
===================================================================
--- libusb-0.1.12.orig/linux.c	2007-01-12 10:02:24.000000000 -0500
+++ libusb-0.1.12/linux.c	2007-01-12 10:02:37.000000000 -0500
@@ -213,15 +213,14 @@ static int usb_urb_transfer(usb_dev_hand
       return ret;
     }
 
-    FD_ZERO(&writefds);
-    FD_SET(dev->fd, &writefds);
-
 restart:
     waiting = 1;
     context = NULL;
     while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && waiting) {
       tv.tv_sec = 0;
       tv.tv_usec = 1000; // 1 msec
+      FD_ZERO(&writefds);
+      FD_SET(dev->fd, &writefds);
       select(dev->fd + 1, NULL, &writefds, NULL, &tv); //sub second wait
 
       if (timeout) {

--- End Message ---
--- Begin Message ---
Source: libusb
Source-Version: 2:0.1.12-3

We believe that the bug you reported is fixed in the latest version of
libusb, which is due to be installed in the Debian FTP archive:

libusb++-0.1-4c2_0.1.12-3_amd64.deb
  to pool/main/libu/libusb/libusb++-0.1-4c2_0.1.12-3_amd64.deb
libusb++-dev_0.1.12-3_amd64.deb
  to pool/main/libu/libusb/libusb++-dev_0.1.12-3_amd64.deb
libusb-0.1-4_0.1.12-3_amd64.deb
  to pool/main/libu/libusb/libusb-0.1-4_0.1.12-3_amd64.deb
libusb-0.1-udeb_0.1.12-3_amd64.udeb
  to pool/main/libu/libusb/libusb-0.1-udeb_0.1.12-3_amd64.udeb
libusb-dev_0.1.12-3_amd64.deb
  to pool/main/libu/libusb/libusb-dev_0.1.12-3_amd64.deb
libusb_0.1.12-3.diff.gz
  to pool/main/libu/libusb/libusb_0.1.12-3.diff.gz
libusb_0.1.12-3.dsc
  to pool/main/libu/libusb/libusb_0.1.12-3.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <[EMAIL PROTECTED]> (supplier of updated libusb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 18 Jan 2007 23:12:15 +0100
Source: libusb
Binary: libusb++-dev libusb-dev libusb-0.1-udeb libusb-0.1-4 libusb++-0.1-4c2
Architecture: source amd64
Version: 2:0.1.12-3
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <[EMAIL PROTECTED]>
Changed-By: Aurelien Jarno <[EMAIL PROTECTED]>
Description: 
 libusb++-0.1-4c2 - userspace C++ USB programming library
 libusb++-dev - userspace C++ USB programming library development files
 libusb-0.1-4 - userspace USB programming library
 libusb-0.1-udeb - userspace USB programming library (udeb)
 libusb-dev - userspace USB programming library development files
Closes: 404901 406644
Changes: 
 libusb (2:0.1.12-3) unstable; urgency=low
 .
   * Fixed the use of select for URB transfer. Thanks to Daniel
     Jacobowitz for the patch (closes: bug#406644).
   * Fixed usbpp.h (closes: bug#404901).
   * Upgraded policy compliance to 3.7.2 (no changes).
Files: 
 79ef9491ea313020f82bc27f826a211c 693 libs optional libusb_0.1.12-3.dsc
 a161e94ab0fd7cf1b5654c6a096e1c92 113726 libs optional libusb_0.1.12-3.diff.gz
 3fb0e9e58d1f268e4506cbcd54c519bd 20262 libs important 
libusb-0.1-4_0.1.12-3_amd64.deb
 53598f5c90c102212511900e169080bd 40522 libdevel optional 
libusb-dev_0.1.12-3_amd64.deb
 eaa3b0659a5673abc1f075615347c5fc 14984 libs optional 
libusb++-0.1-4c2_0.1.12-3_amd64.deb
 0630bd86151eb18b05a0fe203abf1ac6 20098 libdevel optional 
libusb++-dev_0.1.12-3_amd64.deb
 7be2ab2ecfa9b6a84a7787511b01dca2 12296 debian-installer optional 
libusb-0.1-udeb_0.1.12-3_amd64.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFr/Igw3ao2vG823MRAtYZAJ9SUMTsZfiNr4A0fdY0J8ht253c0ACfZ7jg
C1hcU1JnQwjKvYZCc8IBIok=
=xeX8
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to