diff options
author | Martin Szulecki | 2012-07-17 18:36:22 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 18:36:22 +0200 |
commit | 571ab2b51224d51a1b599d81a23eda25527daae5 (patch) | |
tree | b4081d76d586d35af12623826610dd162d705430 /src | |
parent | 1110ad7fe35b1a19a1efe185a2effedbee961dfb (diff) | |
download | idevicerestore-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/recovery.c | 6 |
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; |