diff options
| author | 2015-10-09 01:33:39 +0200 | |
|---|---|---|
| committer | 2015-10-09 01:33:39 +0200 | |
| commit | f5eff51c19612bb034482bdf71cb4a8a053f0d71 (patch) | |
| tree | 7dbee6fa6f3d66cfe3d8e3184d53071c4bf73202 /src/libirecovery.c | |
| parent | a43da1da7b0555998441b305b30c2f3cba46acdf (diff) | |
| download | libirecovery-f5eff51c19612bb034482bdf71cb4a8a053f0d71.tar.gz libirecovery-f5eff51c19612bb034482bdf71cb4a8a053f0d71.tar.bz2 | |
Only set interface alt setting for interface setting 1
Diffstat (limited to 'src/libirecovery.c')
| -rw-r--r-- | src/libirecovery.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 7a5046a..57ac850 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -908,8 +908,10 @@ IRECV_API irecv_error_t irecv_usb_set_interface(irecv_client_t client, int usb_i | |||
| 908 | return IRECV_E_USB_INTERFACE; | 908 | return IRECV_E_USB_INTERFACE; |
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | if (libusb_set_interface_alt_setting(client->handle, usb_interface, usb_alt_interface) < 0) { | 911 | if (usb_interface == 1) { |
| 912 | return IRECV_E_USB_INTERFACE; | 912 | if (libusb_set_interface_alt_setting(client->handle, usb_interface, usb_alt_interface) < 0) { |
| 913 | return IRECV_E_USB_INTERFACE; | ||
| 914 | } | ||
| 913 | } | 915 | } |
| 914 | #else | 916 | #else |
| 915 | if (irecv_usb_control_transfer(client, 0, 0x0B, usb_alt_interface, usb_interface, NULL, 0, USB_TIMEOUT) < 0) { | 917 | if (irecv_usb_control_transfer(client, 0, 0x0B, usb_alt_interface, usb_interface, NULL, 0, USB_TIMEOUT) < 0) { |
