diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2018-02-25 16:21:50 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2018-02-25 16:21:50 +0100 |
commit | fe27d3f7fe4ff3d51731589f52ce3f9322b4e489 (patch) | |
tree | f88c13f8a9d1f21629dcda26afeaa25a0e55d6f1 /libgphoto2_port | |
parent | 58a7e4ec0b43529be28dbe7151b8dbd2331bc5b4 (diff) | |
download | libgphoto2-fe27d3f7fe4ff3d51731589f52ce3f9322b4e489.tar.gz |
if we have no interrupt endpoint, do no try to queue interrupt URBs.
fixes https://github.com/gphoto/libgphoto2/issues/234
Diffstat (limited to 'libgphoto2_port')
-rw-r--r-- | libgphoto2_port/libusb1/libusb1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c index 8148a61bd..8b4a5c073 100644 --- a/libgphoto2_port/libusb1/libusb1.c +++ b/libgphoto2_port/libusb1/libusb1.c @@ -693,6 +693,11 @@ gp_libusb1_queue_interrupt_urbs (GPPort *port) unsigned int i; int ret = 0; + /* no interrupt endpoint */ + if (port->settings.usb.intep == -1) + return GP_OK; + + for (i = 0; i < sizeof(port->pl->transfers)/sizeof(port->pl->transfers[0]); i++) { unsigned char *buf; if (port->pl->transfers[i] != NULL) |