summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-17 17:56:49 +0200
committerGravatar Nikias Bassen2012-07-17 17:56:49 +0200
commit4e338a3126568ad3995795ea16d9955db8c6e002 (patch)
treec50009b06bb2850eeeaddda98bf27b1519152879 /src/restore.c
parent0a75e4699866eb8c1d30cf955b01462f2a180334 (diff)
downloadidevicerestore-4e338a3126568ad3995795ea16d9955db8c6e002.tar.gz
idevicerestore-4e338a3126568ad3995795ea16d9955db8c6e002.tar.bz2
restore: Parse and return AMRError value as error code in StatusMsg handler
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/restore.c b/src/restore.c
index f0e79c6..676d449 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -522,14 +522,22 @@ 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;
+ case 1015:
+ info("Status: X-Gold Baseband Update Failed. Defective Unit?\n");
break;
default:
info("Unhandled status message (" FMT_qu ")\n", (long long unsigned int)value);
+ break;
+ }
+
+ node = plist_dict_get_item(msg, "AMRError");
+ if (node && plist_get_node_type(node) == PLIST_UINT) {
+ plist_get_uint_val(node, &value);
+ result = -value;
}
return result;