summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-17 18:36:22 +0200
committerGravatar Nikias Bassen2012-07-17 18:36:22 +0200
commit571ab2b51224d51a1b599d81a23eda25527daae5 (patch)
treeb4081d76d586d35af12623826610dd162d705430
parent1110ad7fe35b1a19a1efe185a2effedbee961dfb (diff)
downloadidevicerestore-571ab2b51224d51a1b599d81a23eda25527daae5.tar.gz
idevicerestore-571ab2b51224d51a1b599d81a23eda25527daae5.tar.bz2
recovery: Make sure a connection is available before sending iBEC, too
The code path without TSS request did not initialize the recovery client in order for it to be used to send iBEC. Now the client is always initialized.
-rw-r--r--src/recovery.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/recovery.c b/src/recovery.c
index fc04b1a..5e1c4c2 100644
--- a/src/recovery.c
+++ b/src/recovery.c
@@ -288,6 +288,12 @@ int recovery_send_ibec(struct idevicerestore_client_t* client, plist_t build_ide
const char* component = "iBEC";
irecv_error_t recovery_error = IRECV_E_SUCCESS;
+ if (client->recovery == NULL) {
+ if (recovery_client_new(client) < 0) {
+ return -1;
+ }
+ }
+
if (recovery_send_component(client, build_identity, component) < 0) {
error("ERROR: Unable to send %s to device.\n", component);
return -1;