diff options
author | Joshua Hill | 2010-06-05 18:09:06 -0400 |
---|---|---|
committer | Joshua Hill | 2010-06-05 18:09:06 -0400 |
commit | 255b285d22056dde283d33511c14387ea92e28c0 (patch) | |
tree | c039506ad319c2ec81f5a0aeb5ac4737b10d9389 /src/recovery.c | |
parent | 5fe87e252c9c28a67277e21febb19027feb32372 (diff) | |
download | idevicerestore-255b285d22056dde283d33511c14387ea92e28c0.tar.gz idevicerestore-255b285d22056dde283d33511c14387ea92e28c0.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; } |