summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-17 16:05:17 +0200
committerGravatar Nikias Bassen2012-07-17 16:05:17 +0200
commit995ed659864e14b7c55ee948889b3ffff7ff4991 (patch)
treec24e26ef05213a05e75d702e3123cb70fb0aa4f9 /src/restore.c
parent5e8990bf24b1f5319d1d1d00007f02919753b175 (diff)
downloadidevicerestore-995ed659864e14b7c55ee948889b3ffff7ff4991.tar.gz
idevicerestore-995ed659864e14b7c55ee948889b3ffff7ff4991.tar.bz2
main/restore: Pass full client to restore mode and device discovery functions
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c8
1 files changed, 4 insertions, 4 deletions
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;
}