summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2016-01-04 21:30:58 +0100
committerMarcus Meissner <marcus@jet.franken.de>2016-01-04 21:30:58 +0100
commit3be8db4590c8eea1106d39d014845d6e454954dc (patch)
tree527c5d4f007110ad5a5297b89ab5b249edf75752
parent6a9a0e6bddc56128b23f191d816bed308db64cf5 (diff)
downloadlibgphoto2-3be8db4590c8eea1106d39d014845d6e454954dc.tar.gz
timeout polling for the pending async cancel events,
to clear them off the queue
-rw-r--r--libgphoto2_port/libusb1/libusb1.c3
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++) {