summaryrefslogtreecommitdiff
path: root/libgphoto2_port
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2018-02-25 16:21:50 +0100
committerMarcus Meissner <marcus@jet.franken.de>2018-02-25 16:21:50 +0100
commitfe27d3f7fe4ff3d51731589f52ce3f9322b4e489 (patch)
treef88c13f8a9d1f21629dcda26afeaa25a0e55d6f1 /libgphoto2_port
parent58a7e4ec0b43529be28dbe7151b8dbd2331bc5b4 (diff)
downloadlibgphoto2-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.c5
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)