summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-02-03 21:49:20 +0100
committerGravatar Nikias Bassen2012-02-03 21:49:20 +0100
commit02221092492ca7036aa2ec6b02cbc9fdad850893 (patch)
treef5c8f3f18990541bab2cdcca557efcb3e1430f79 /src
parent42936967e5c2e52862995b19f6916a064d4d7162 (diff)
downloadidevicerestore-02221092492ca7036aa2ec6b02cbc9fdad850893.tar.gz
idevicerestore-02221092492ca7036aa2ec6b02cbc9fdad850893.tar.bz2
restore: don't enter endless loop on restore error
Diffstat (limited to 'src')
-rw-r--r--src/restore.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/restore.c b/src/restore.c
index ec7d92e..361ccb6 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -395,6 +395,7 @@ int restore_handle_progress_msg(restored_client_t client, plist_t msg) {
}
int restore_handle_status_msg(restored_client_t client, plist_t msg) {
+ int result = 0;
uint64_t value = 0;
info("Got status message\n");
debug_plist(msg);
@@ -409,15 +410,17 @@ int restore_handle_status_msg(restored_client_t client, plist_t msg) {
break;
case 6:
info("Status: Disk Failure\n");
+ result = -1;
break;
case 14:
info("Status: Fail\n");
+ result = -1;
break;
default:
- info("Unknown status message.\n");
+ info("Unhandled status message (%ld)\n", value);
}
- return 0;
+ return result;
}
int restore_send_filesystem(idevice_t device, const char* filesystem) {