diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2016-01-04 21:30:58 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2016-01-04 21:30:58 +0100 |
commit | 3be8db4590c8eea1106d39d014845d6e454954dc (patch) | |
tree | 527c5d4f007110ad5a5297b89ab5b249edf75752 | |
parent | 6a9a0e6bddc56128b23f191d816bed308db64cf5 (diff) | |
download | libgphoto2-3be8db4590c8eea1106d39d014845d6e454954dc.tar.gz |
timeout polling for the pending async cancel events,
to clear them off the queue
-rw-r--r-- | libgphoto2_port/libusb1/libusb1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c index a244532e8..76d11b873 100644 --- a/libgphoto2_port/libusb1/libusb1.c +++ b/libgphoto2_port/libusb1/libusb1.c @@ -450,6 +450,9 @@ _close_async_interrupts(GPPort *port) } } } + tv.tv_sec = 0; + tv.tv_usec = 0; + LOG_ON_LIBUSB_E (libusb_handle_events_timeout(port->pl->ctx, &tv)); /* Do just one round ... this should be sufficient and avoids endless loops. */ haveone = 0; for (i = 0; i < sizeof(port->pl->transfers)/sizeof(port->pl->transfers[0]); i++) { |