diff options
Diffstat (limited to 'src/libirecovery.c')
| -rw-r--r-- | src/libirecovery.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 7315001..83ceefd 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -758,9 +758,10 @@ irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned long long e | |||
| 758 | 758 | ||
| 759 | debug("opening device %04x:%04x...\n", usb_descriptor.idVendor, usb_descriptor.idProduct); | 759 | debug("opening device %04x:%04x...\n", usb_descriptor.idVendor, usb_descriptor.idProduct); |
| 760 | 760 | ||
| 761 | libusb_open(usb_device, &usb_handle); | 761 | int libusb_error = libusb_open(usb_device, &usb_handle); |
| 762 | if (usb_handle == NULL) { | 762 | if (usb_handle == NULL || libusb_error != 0) { |
| 763 | debug("%s: can't connect to device...\n", __func__); | 763 | debug("%s: can't connect to device: %s\n", __func__, libusb_error_name(libusb_error)); |
| 764 | |||
| 764 | libusb_close(usb_handle); | 765 | libusb_close(usb_handle); |
| 765 | if (ecid != 0) { | 766 | if (ecid != 0) { |
| 766 | continue; | 767 | continue; |
