summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-11-20 17:00:35 +0100
committerGravatar Martin Szulecki2013-11-20 17:04:04 +0100
commit76e3f71c1aa7d54b2653073a32ae42c8088ca72a (patch)
tree486f3097375185a8638c2f06728d97059be4b75c /src/idevicerestore.c
parent3c04e82be9af10e8b9b45a3d7138a67c7b04a616 (diff)
downloadidevicerestore-76e3f71c1aa7d54b2653073a32ae42c8088ca72a.tar.gz
idevicerestore-76e3f71c1aa7d54b2653073a32ae42c8088ca72a.tar.bz2
dfu: Implement dfu_get_ecid() to fix connectivity issues from DFU mode
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index dcd538e..d1db628 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -754,6 +754,7 @@ int idevicerestore_start(struct idevicerestore_client_t* client)
// if the device is in DFU mode, place device into recovery mode
if (client->mode->index == MODE_DFU) {
+ dfu_client_free(client);
recovery_client_free(client);
if ((client->flags & FLAG_CUSTOM) && limera1n_is_supported(client->device)) {
info("connecting to DFU\n");
@@ -1225,6 +1226,11 @@ int get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid) {
break;
case MODE_DFU:
+ if (dfu_get_ecid(client, ecid) < 0) {
+ *ecid = 0;
+ return -1;
+ }
+ break;
case MODE_RECOVERY:
if (recovery_get_ecid(client, ecid) < 0) {
*ecid = 0;