diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2017-03-05 17:26:45 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2017-03-05 17:26:45 +0100 |
commit | a318d18d818d29751c279c595e28ffd0b3ac21b8 (patch) | |
tree | 6284f9cd956e52460f30aee574576b467945ca2d | |
parent | 9ab2ccb28b71937670dea74aa82dc5c3e6b9462c (diff) | |
download | libgphoto2-a318d18d818d29751c279c595e28ffd0b3ac21b8.tar.gz |
if there is no timeout, just check if anything is in the interrupt 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 cf36fc512..b082b77b5 100644 --- a/libgphoto2_port/libusb1/libusb1.c +++ b/libgphoto2_port/libusb1/libusb1.c @@ -676,6 +676,9 @@ gp_libusb1_check_int (GPPort *port, char *bytes, int size, int timeout) if (port->pl->nrofirqs) goto handleirq; + if (!timeout) + return GP_ERROR_TIMEOUT; + tv.tv_sec = timeout/1000; tv.tv_usec = (timeout%1000)*1000; |