diff options
author | Nikias Bassen | 2012-07-17 18:49:28 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 18:49:28 +0200 |
commit | 68e08c82e0ec549ce491786a95914d478d864c89 (patch) | |
tree | c6fc564568aaaac1bf8445f825a7e4c77f12a890 /src/restore.c | |
parent | 3f63b29d0d4ecf8ea2a5bdec3a743c306011415b (diff) | |
download | idevicerestore-68e08c82e0ec549ce491786a95914d478d864c89.tar.gz idevicerestore-68e08c82e0ec549ce491786a95914d478d864c89.tar.bz2 |
asr: implemented checksumming for filesystem upload
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/restore.c b/src/restore.c index c1d5e25..25d51f6 100644 --- a/src/restore.c +++ b/src/restore.c @@ -640,7 +640,7 @@ int restore_send_filesystem(idevice_t device, const char* filesystem) { int i = 0; FILE* file = NULL; plist_t data = NULL; - idevice_connection_t asr = NULL; + asr_client_t asr = NULL; idevice_error_t device_error = IDEVICE_E_UNKNOWN_ERROR; info("About to send filesystem...\n"); @@ -651,20 +651,12 @@ int restore_send_filesystem(idevice_t device, const char* filesystem) { } info("Connected to ASR\n"); - /* receive Initiate command message */ - if (asr_receive(asr, &data) < 0) { - error("ERROR: Unable to receive data from ASR\n"); - asr_close(asr); - return -1; - } - plist_free(data); - // this step sends requested chunks of data from various offsets to asr so // it can validate the filesystem before installing it info("Validating the filesystem\n"); if (asr_perform_validation(asr, filesystem) < 0) { error("ERROR: ASR was unable to validate the filesystem\n"); - asr_close(asr); + asr_free(asr); return -1; } info("Filesystem validated\n"); @@ -674,12 +666,12 @@ int restore_send_filesystem(idevice_t device, const char* filesystem) { info("Sending filesystem now...\n"); if (asr_send_payload(asr, filesystem) < 0) { error("ERROR: Unable to send payload to ASR\n"); - asr_close(asr); + asr_free(asr); return -1; } info("Done sending filesystem\n"); - asr_close(asr); + asr_free(asr); return 0; } |