summaryrefslogtreecommitdiffstats
path: root/src/dfu.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-07-09 03:47:42 +0200
committerGravatar Martin Szulecki2010-07-09 03:47:42 +0200
commit4090b98d9e8cdaada701ac320e20f7c8b0cf88f6 (patch)
treedf380c2461c0be04009b864769261cf9a89439ec /src/dfu.c
parentbfd4f97062a89d046d73f9e7439ac5e74ef8dcdc (diff)
downloadidevicerestore-4090b98d9e8cdaada701ac320e20f7c8b0cf88f6.tar.gz
idevicerestore-4090b98d9e8cdaada701ac320e20f7c8b0cf88f6.tar.bz2
Implement handling of devices which do not require a tss request
This introduces passing around the "selected" build identity and fixes code logic issues to make idevicerestore work again.
Diffstat (limited to 'src/dfu.c')
-rw-r--r--src/dfu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 6fd2648..0b3ad51 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -108,10 +108,11 @@ int dfu_check_mode() {
return -1;
}
-int dfu_enter_recovery(struct idevicerestore_client_t* client) {
+int dfu_enter_recovery(struct idevicerestore_client_t* client, plist_t build_identity) {
irecv_client_t dfu = NULL;
const char* component = "iBSS";
irecv_error_t dfu_error = IRECV_E_SUCCESS;
+
if (recovery_open_with_timeout(client) < 0 || dfu->mode != kDfuMode) {
error("ERROR: Unable to connect to DFU device\n");
if (dfu)
@@ -119,7 +120,7 @@ int dfu_enter_recovery(struct idevicerestore_client_t* client) {
return -1;
}
- if (recovery_send_signed_component(client, "iBSS") < 0) {
+ if (recovery_send_component(client, build_identity, component) < 0) {
error("ERROR: Unable to send %s to device\n", component);
irecv_close(dfu);
return -1;