diff options
-rw-r--r-- | src/idevicerestore.c | 4 | ||||
-rw-r--r-- | src/restore.c | 8 | ||||
-rw-r--r-- | src/restore.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index ed89ae8..47c9a4c 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -823,7 +823,7 @@ int check_mode(struct idevicerestore_client_t* client) { mode = MODE_NORMAL; } - else if (!client->ecid && client->udid && (restore_check_mode(client->udid) == 0)) { + else if (!client->ecid && client->udid && (restore_check_mode(client) == 0)) { mode = MODE_RESTORE; } @@ -839,7 +839,7 @@ int check_device(struct idevicerestore_client_t* client) { switch (client->mode->index) { case MODE_RESTORE: if (!client->ecid && client->udid) { - device = restore_check_device(client->udid); + device = restore_check_device(client); if (device < 0) { device = DEVICE_UNKNOWN; } diff --git a/src/restore.c b/src/restore.c index 402de78..eb07763 100644 --- a/src/restore.c +++ b/src/restore.c @@ -88,7 +88,7 @@ void restore_client_free(struct idevicerestore_client_t* client) { } } -int restore_check_mode(const char* udid) { +int restore_check_mode(struct idevicerestore_client_t* client) { char* type = NULL; uint64_t version = 0; idevice_t device = NULL; @@ -96,7 +96,7 @@ int restore_check_mode(const char* udid) { idevice_error_t device_error = IDEVICE_E_SUCCESS; restored_error_t restore_error = RESTORE_E_SUCCESS; - device_error = idevice_new(&device, udid); + device_error = idevice_new(&device, client->udid); if (device_error != IDEVICE_E_SUCCESS) { return -1; } @@ -121,7 +121,7 @@ int restore_check_mode(const char* udid) { return 0; } -int restore_check_device(const char* udid) { +int restore_check_device(struct idevicerestore_client_t* client) { int i = 0; char* type = NULL; char* model = NULL; @@ -132,7 +132,7 @@ int restore_check_device(const char* udid) { idevice_error_t device_error = IDEVICE_E_SUCCESS; restored_error_t restore_error = RESTORE_E_SUCCESS; - device_error = idevice_new(&device, udid); + device_error = idevice_new(&device, client->udid); if (device_error != IDEVICE_E_SUCCESS) { return -1; } diff --git a/src/restore.h b/src/restore.h index 6e9c96e..7ad0d9f 100644 --- a/src/restore.h +++ b/src/restore.h @@ -40,8 +40,8 @@ struct restore_client_t { restored_client_t client; }; -int restore_check_mode(const char* udid); -int restore_check_device(const char* udid); +int restore_check_mode(struct idevicerestore_client_t* client); +int restore_check_device(struct idevicerestore_client_t* client); int restore_client_new(struct idevicerestore_client_t* client); void restore_client_free(struct idevicerestore_client_t* client); int restore_reboot(struct idevicerestore_client_t* client); |