diff options
Diffstat (limited to 'src/libirecovery.c')
| -rw-r--r-- | src/libirecovery.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index a2e54b1..23e1501 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -447,7 +447,7 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 447 | continue; | 447 | continue; |
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | char* serial_str[256]; | 450 | char serial_str[256]; |
| 451 | serial_str[0] = '\0'; | 451 | serial_str[0] = '\0'; |
| 452 | if ((sscanf(result, "\\\\?\\usb#vid_%*04x&pid_%*04x#%s#", serial_str) != 1) || (serial_str[0] == '\0')) { | 452 | if ((sscanf(result, "\\\\?\\usb#vid_%*04x&pid_%*04x#%s#", serial_str) != 1) || (serial_str[0] == '\0')) { |
| 453 | mobiledevice_closepipes(_client); | 453 | mobiledevice_closepipes(_client); |
| @@ -469,6 +469,8 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | irecv_load_device_info_from_iboot_string(_client, serial_str); | 471 | irecv_load_device_info_from_iboot_string(_client, serial_str); |
| 472 | irecv_copy_nonce_with_tag(_client, "NONC", &_client->device_info.ap_nonce, &_client->device_info.ap_nonce_size); | ||
| 473 | irecv_copy_nonce_with_tag(_client, "SNON", &_client->device_info.sep_nonce, &_client->device_info.sep_nonce_size); | ||
| 472 | 474 | ||
| 473 | if (ecid != 0) { | 475 | if (ecid != 0) { |
| 474 | if (_client->device_info.ecid != ecid) { | 476 | if (_client->device_info.ecid != ecid) { |
| @@ -544,6 +546,10 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 544 | } | 546 | } |
| 545 | } | 547 | } |
| 546 | 548 | ||
| 549 | irecv_load_device_info_from_iboot_string(_client, serial_str); | ||
| 550 | irecv_copy_nonce_with_tag(_client, "NONC", &_client->device_info.ap_nonce, &_client->device_info.ap_nonce_size); | ||
| 551 | irecv_copy_nonce_with_tag(_client, "SNON", &_client->device_info.sep_nonce, &_client->device_info.sep_nonce_size); | ||
| 552 | |||
| 547 | if (ecid != 0) { | 553 | if (ecid != 0) { |
| 548 | if (_client->device_info.ecid != ecid) { | 554 | if (_client->device_info.ecid != ecid) { |
| 549 | mobiledevice_closepipes(_client); | 555 | mobiledevice_closepipes(_client); |
