Package: libusb-0.1-4
Version: 2:0.1.12-11
Severity: important
Patch attached, which fixes described problem.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.25-custom-04 (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages libusb-0.1-4 depends on:
ii libc6 2.7-10 GNU C Library: Shared libraries
libusb-0.1-4 recommends no packages.
-- no debconf information
diff -Naur libusb-0.1.12/linux.c libusb-0.1.12-new/linux.c
--- libusb-0.1.12/linux.c 2006-03-04 04:52:46.000000000 +0200
+++ libusb-0.1.12-new/linux.c 2008-06-11 14:22:20.000000000 +0300
@@ -220,6 +220,13 @@
waiting = 1;
context = NULL;
while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && waiting) {
+ if (ret == -1)
+ {
+ if (errno == ENODEV)
+ {
+ return -ENODEV;
+ }
+ }
tv.tv_sec = 0;
tv.tv_usec = 1000; // 1 msec
select(dev->fd + 1, NULL, &writefds, NULL, &tv); //sub second wait