summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-12-02 20:58:16 +0100
committerGravatar Martin Szulecki2013-12-02 20:58:16 +0100
commitfe0c96c9a6bdef1282cef60fbbcb38b246d1fe69 (patch)
tree903d14c70afadd400cd1e5e8ce3f6928ae346ebf /src/libirecovery.c
parent22973c90b089a15b1682ebfefc5cbf1560219ef2 (diff)
downloadlibirecovery-fe0c96c9a6bdef1282cef60fbbcb38b246d1fe69.tar.gz
libirecovery-fe0c96c9a6bdef1282cef60fbbcb38b246d1fe69.tar.bz2
libirecovery: Set USB interfaces correctly on device connection for non-WIN32
Now the USB interface is set the same way the WIN32 code does it. This prevents older devices from getting "stuck" or "slow" after uploading the iBEC to a device.
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r--src/libirecovery.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 23e1501..5bf76da 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -807,7 +807,9 @@ irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned long long e
if ((client->mode != IRECV_K_DFU_MODE) && (client->mode != IRECV_K_WTF_MODE)) {
error = irecv_usb_set_interface(client, 0, 0);
- error = irecv_usb_set_interface(client, 1, 1);
+ if (client->mode > IRECV_K_RECOVERY_MODE_2) {
+ error = irecv_usb_set_interface(client, 1, 1);
+ }
} else {
error = irecv_usb_set_interface(client, 0, 0);
}