From 571ab2b51224d51a1b599d81a23eda25527daae5 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 18:36:22 +0200 Subject: 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. --- src/recovery.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/recovery.c') 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; -- cgit v1.1-32-gdbae