diff options
author | Nikias Bassen | 2013-11-18 15:00:43 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-11-18 15:00:43 +0100 |
commit | e12bd5fc5c9b59e01288dbf0e8e1edc32aa03bf0 (patch) | |
tree | f3c5bd30e3612206c4c511f3b8e9a67e7b11461b /src | |
parent | 752da7f10c3b19359a84c807a32c9f94154a8aee (diff) | |
download | idevicerestore-e12bd5fc5c9b59e01288dbf0e8e1edc32aa03bf0.tar.gz idevicerestore-e12bd5fc5c9b59e01288dbf0e8e1edc32aa03bf0.tar.bz2 |
normal: always try a non-handshake connection if handshake fails
Diffstat (limited to 'src')
-rw-r--r-- | src/normal.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/normal.c b/src/normal.c index e498113..2c31b4e 100644 --- a/src/normal.c +++ b/src/normal.c @@ -33,8 +33,6 @@ #include "normal.h" #include "recovery.h" -extern int16_t userpref_remove_device_record(const char* udid); - static int normal_device_connected = 0; void normal_device_callback(const idevice_event_t* event, void* userdata) { @@ -229,16 +227,8 @@ const char* normal_check_product_type(struct idevicerestore_client_t* client) { } lockdown_error = lockdownd_client_new_with_handshake(device, &lockdown, "idevicerestore"); - if (lockdown_error == LOCKDOWN_E_PASSWORD_PROTECTED) { + if (lockdown_error != LOCKDOWN_E_SUCCESS) { lockdown_error = lockdownd_client_new(device, &lockdown, "idevicerestore"); - } else if (lockdown_error == LOCKDOWN_E_INVALID_HOST_ID) { - char* udid = NULL; - lockdownd_unpair(lockdown, NULL); - idevice_get_udid(device, &udid); - if (udid) { - userpref_remove_device_record(udid); - } - lockdown_error = lockdownd_client_new_with_handshake(device, &lockdown, "idevicerestore"); } if (lockdown_error != LOCKDOWN_E_SUCCESS) { idevice_free(device); |