diff options
Diffstat (limited to 'libirecovery.c')
| -rw-r--r-- | libirecovery.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libirecovery.c b/libirecovery.c index 0c166ff..d6b1c5b 100644 --- a/libirecovery.c +++ b/libirecovery.c | |||
| @@ -177,6 +177,15 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 177 | continue; | 177 | continue; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | if (ecid == kWTFMode) { | ||
| 181 | if (_client->mode != kWTFMode) { | ||
| 182 | // special ecid case, ignore !kWTFMode | ||
| 183 | continue; | ||
| 184 | } else { | ||
| 185 | ecid = 0; | ||
| 186 | } | ||
| 187 | } | ||
| 188 | |||
| 180 | if ((ecid != 0) && (_client->mode == kWTFMode)) { | 189 | if ((ecid != 0) && (_client->mode == kWTFMode)) { |
| 181 | // we can't get ecid in WTF mode | 190 | // we can't get ecid in WTF mode |
| 182 | mobiledevice_closepipes(_client); | 191 | mobiledevice_closepipes(_client); |
| @@ -496,6 +505,15 @@ irecv_error_t irecv_open(irecv_client_t* pclient, unsigned long long ecid) { | |||
| 496 | usb_descriptor.idProduct == kWTFMode || | 505 | usb_descriptor.idProduct == kWTFMode || |
| 497 | usb_descriptor.idProduct == kDfuMode) { | 506 | usb_descriptor.idProduct == kDfuMode) { |
| 498 | 507 | ||
| 508 | if (ecid == kWTFMode) { | ||
| 509 | if (usb_descriptor.idProduct != kWTFMode) { | ||
| 510 | // special ecid case, ignore !kWTFMode | ||
| 511 | continue; | ||
| 512 | } else { | ||
| 513 | ecid = 0; | ||
| 514 | } | ||
| 515 | } | ||
| 516 | |||
| 499 | if ((ecid != 0) && (usb_descriptor.idProduct == kWTFMode)) { | 517 | if ((ecid != 0) && (usb_descriptor.idProduct == kWTFMode)) { |
| 500 | // we can't get ecid in WTF mode | 518 | // we can't get ecid in WTF mode |
| 501 | continue; | 519 | continue; |
