diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-03-07 11:44:00 +0000 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2013-03-10 03:05:05 +0000 |
commit | 0debd22baaddfa678ec80cb19be7852504ab7deb (patch) | |
tree | cd69a1b21bd004610b30a8479106464efd6c4c8f | |
parent | a0beff7d985eeee014d51b725e32533cc216a579 (diff) | |
download | libusb-0debd22baaddfa678ec80cb19be7852504ab7deb.tar.gz |
Linux: Consume all events on a fd in one go
* This fixes libusb_handle_events_timeout() only handling one event
* Closes #6
-rw-r--r-- | libusb/os/linux_usbfs.c | 4 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index ce77229..99bbd07 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c @@ -2490,7 +2490,9 @@ static int op_handle_events(struct libusb_context *ctx, continue; } - r = reap_for_handle(handle); + do { + r = reap_for_handle(handle); + } while (r == 0); if (r == 1 || r == LIBUSB_ERROR_NO_DEVICE) continue; else if (r < 0) diff --git a/libusb/version_nano.h b/libusb/version_nano.h index ff18d50..3aad736 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10623 +#define LIBUSB_NANO 10624 |