diff options
author | Joshua Hill | 2010-06-07 14:24:08 +0800 |
---|---|---|
committer | rcg4u | 2010-06-09 17:17:29 +0800 |
commit | a274554b753880dd7042b6013d0158a0b81124c7 (patch) | |
tree | b114cc3ab2369805ece1c169684a7f95ffdf7d3b /src/recovery.c | |
parent | 9279f889d7e296880fd7ea9d6c7cec499db62ea4 (diff) | |
download | idevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.gz idevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.bz2 |
I really need to put more descriptive messages here, but im doing stuff all over the place
Diffstat (limited to 'src/recovery.c')
-rw-r--r-- | src/recovery.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/recovery.c b/src/recovery.c index e67b10d..52f4802 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -31,6 +31,13 @@ #include "recovery.h" #include "idevicerestore.h" +int recovery_progress_callback(irecv_client_t client, const irecv_event_t* event) { + if (event->type == IRECV_PROGRESS) { + print_progress_bar(event->data, event->progress); + } + return 0; +} + int recovery_check_mode() { irecv_client_t recovery = NULL; irecv_error_t recovery_error = IRECV_E_SUCCESS; @@ -92,8 +99,9 @@ int recovery_enter_restore(const char* uuid, const char* ipsw, plist_t tss) { error("ERROR: Unable to connect to device in restore mode\n"); return -1; } - restore_close(device, restore); + restore_close(device, restore); + idevicerestore_mode = MODE_RESTORE; return 0; } @@ -149,6 +157,7 @@ int recovery_open_with_timeout(irecv_client_t* client) { debug("Retrying connection...\n"); } + irecv_event_subscribe(recovery, IRECV_PROGRESS, &recovery_progress_callback, NULL); *client = recovery; return 0; } |