diff options
author | Nikias Bassen | 2013-11-29 21:34:39 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-11-29 21:34:39 +0100 |
commit | 82222c539c768cdb2acee1569dc64f4e785dfe12 (patch) | |
tree | be7b915c595a7ef54ebf242deaaca169e7d1cee4 | |
parent | 84982d71abb628ed3a0547fb042ac066d9468154 (diff) | |
download | libirecovery-82222c539c768cdb2acee1569dc64f4e785dfe12.tar.gz libirecovery-82222c539c768cdb2acee1569dc64f4e785dfe12.tar.bz2 |
irecv_open_with_ecid: don't parse ecid twice
-rw-r--r-- | src/libirecovery.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index bbe88aa..a2e54b1 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -785,16 +785,7 @@ irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned long long e irecv_copy_nonce_with_tag(client, "SNON", &client->device_info.sep_nonce, &client->device_info.sep_nonce_size); if (ecid != 0) { - char* ecid_string = strstr(serial_str, "ECID:"); - if (ecid_string == NULL) { - debug("%s: could not get ECID for device\n", __func__); - irecv_close(client); - continue; - } - - unsigned long long this_ecid = 0; - sscanf(ecid_string, "ECID:" _FMT_qX, (unsigned long long*)&this_ecid); - if (this_ecid != ecid) { + if (client->device_info.ecid != ecid) { irecv_close(client); continue; } |