diff options
| -rw-r--r-- | src/libirecovery.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index f53ca45..47ca81f 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -410,10 +410,9 @@ typedef struct usb_control_request { | |||
| 410 | char data[]; | 410 | char data[]; |
| 411 | } usb_control_request; | 411 | } usb_control_request; |
| 412 | 412 | ||
| 413 | static int irecv_get_string_descriptor_ascii(irecv_client_t client, uint8_t desc_index, unsigned char * buffer, int size); | ||
| 414 | |||
| 415 | irecv_error_t mobiledevice_openpipes(irecv_client_t client); | 413 | irecv_error_t mobiledevice_openpipes(irecv_client_t client); |
| 416 | void mobiledevice_closepipes(irecv_client_t client); | 414 | void mobiledevice_closepipes(irecv_client_t client); |
| 415 | irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ecid); | ||
| 417 | 416 | ||
| 418 | irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ecid) { | 417 | irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ecid) { |
| 419 | int found = 0; | 418 | int found = 0; |
| @@ -479,12 +478,12 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 479 | *p = '\0'; | 478 | *p = '\0'; |
| 480 | } | 479 | } |
| 481 | 480 | ||
| 482 | int j; | 481 | unsigned int j; |
| 483 | for (j = 0; j < strlen(serial_str); j++) { | 482 | for (j = 0; j < strlen(serial_str); j++) { |
| 484 | if (serial_str[j] == '_') { | 483 | if (serial_str[j] == '_') { |
| 485 | serial_str[j] = ' '; | 484 | serial_str[j] = ' '; |
| 486 | } else { | 485 | } else { |
| 487 | serial_str[j] = toupper(serial_str[j]); | 486 | serial_str[j] = toupper(serial_str[j]); |
| 488 | } | 487 | } |
| 489 | } | 488 | } |
| 490 | 489 | ||
| @@ -492,7 +491,7 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 492 | irecv_copy_nonce_with_tag(_client, "NONC", &_client->device_info.ap_nonce, &_client->device_info.ap_nonce_size); | 491 | irecv_copy_nonce_with_tag(_client, "NONC", &_client->device_info.ap_nonce, &_client->device_info.ap_nonce_size); |
| 493 | irecv_copy_nonce_with_tag(_client, "SNON", &_client->device_info.sep_nonce, &_client->device_info.sep_nonce_size); | 492 | irecv_copy_nonce_with_tag(_client, "SNON", &_client->device_info.sep_nonce, &_client->device_info.sep_nonce_size); |
| 494 | 493 | ||
| 495 | if (ecid != 0) { | 494 | if (ecid != 0) { |
| 496 | if (_client->device_info.ecid != ecid) { | 495 | if (_client->device_info.ecid != ecid) { |
| 497 | mobiledevice_closepipes(_client); | 496 | mobiledevice_closepipes(_client); |
| 498 | continue; | 497 | continue; |
| @@ -557,7 +556,7 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec | |||
| 557 | *p = '\0'; | 556 | *p = '\0'; |
| 558 | } | 557 | } |
| 559 | 558 | ||
| 560 | int j; | 559 | unsigned int j; |
| 561 | for (j = 0; j < strlen(serial_str); j++) { | 560 | for (j = 0; j < strlen(serial_str); j++) { |
| 562 | if (serial_str[j] == '_') { | 561 | if (serial_str[j] == '_') { |
| 563 | serial_str[j] = ' '; | 562 | serial_str[j] = ' '; |
