From 82222c539c768cdb2acee1569dc64f4e785dfe12 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 29 Nov 2013 21:34:39 +0100 Subject: irecv_open_with_ecid: don't parse ecid twice --- src/libirecovery.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/libirecovery.c') 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; } -- cgit v1.1-32-gdbae