errno is not used with libusb1, use the return code
for timeout detection git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14718 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -508,7 +508,7 @@ gp_port_usb_check_int (GPPort *port, char *bytes, int size, int timeout)
|
||||
ret = libusb_interrupt_transfer (port->pl->dh, port->settings.usb.intep,
|
||||
(unsigned char*)bytes, size, &curread, timeout);
|
||||
if (ret < 0) {
|
||||
if ((errno == EAGAIN) || (errno == ETIMEDOUT))
|
||||
if (ret == LIBUSB_TRANSFER_TIMED_OUT)
|
||||
return GP_ERROR_TIMEOUT;
|
||||
return GP_ERROR_IO_READ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user