This fixes issue 6: "libusb_handle_events_timeout() only handles one event" https://github.com/libusbx/libusbx/issues/6
Note: untested / POC!! Signed-off-by: Hans de Goede <hdego...@redhat.com> --- libusb/os/linux_usbfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index 97b3776..12708e7 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c @@ -2523,7 +2523,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) -- 1.8.1.4 ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel