diff options
author | Joshua Hill | 2010-06-06 06:09:06 +0800 |
---|---|---|
committer | rcg4u | 2010-06-09 17:17:29 +0800 |
commit | 9279f889d7e296880fd7ea9d6c7cec499db62ea4 (patch) | |
tree | c039506ad319c2ec81f5a0aeb5ac4737b10d9389 /src/recovery.c | |
parent | c21f7031b44e4cd61c1a6e630f9681742923ffa0 (diff) | |
download | idevicerestore-9279f889d7e296880fd7ea9d6c7cec499db62ea4.tar.gz idevicerestore-9279f889d7e296880fd7ea9d6c7cec499db62ea4.tar.bz2 |
Changed the device type to a structure array for cleaner code and cross state access
Diffstat (limited to 'src/recovery.c')
-rw-r--r-- | src/recovery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/recovery.c b/src/recovery.c index a0a1151..e67b10d 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -132,15 +132,15 @@ int recovery_open_with_timeout(irecv_client_t* client) { int i = 0; int attempts = 10; irecv_client_t recovery = NULL; - irecv_error_t recovery_error = IRECV_E_SUCCESS; + irecv_error_t recovery_error = IRECV_E_UNKNOWN_ERROR; for (i = 1; i <= attempts; i++) { - recovery_error = irecv_open(client); + recovery_error = irecv_open(&recovery); if (recovery_error == IRECV_E_SUCCESS) { break; } - if (i == attempts) { + if (i >= attempts) { error("ERROR: Unable to connect to device in recovery mode\n"); return -1; } |