diff options
author | Nikias Bassen | 2012-07-16 15:51:11 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-16 15:51:11 +0200 |
commit | ca392863d770e522285615af4e1a9c1cd38fef33 (patch) | |
tree | 6b6358a627dcc3b3dd9d6a76e898e88bf0a91276 /src/restore.c | |
parent | b94dcbde31247d72a1acd794678876ea0b778ad1 (diff) | |
download | idevicerestore-ca392863d770e522285615af4e1a9c1cd38fef33.tar.gz idevicerestore-ca392863d770e522285615af4e1a9c1cd38fef33.tar.bz2 |
mass replace uuid->udid and raise libimobiledevice requirement to >= 1.1.4
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/restore.c b/src/restore.c index df39b9d..e96fed9 100644 --- a/src/restore.c +++ b/src/restore.c @@ -86,7 +86,7 @@ void restore_client_free(struct idevicerestore_client_t* client) { } } -int restore_check_mode(const char* uuid) { +int restore_check_mode(const char* udid) { char* type = NULL; uint64_t version = 0; idevice_t device = NULL; @@ -94,7 +94,7 @@ int restore_check_mode(const char* uuid) { idevice_error_t device_error = IDEVICE_E_SUCCESS; restored_error_t restore_error = RESTORE_E_SUCCESS; - device_error = idevice_new(&device, uuid); + device_error = idevice_new(&device, udid); if (device_error != IDEVICE_E_SUCCESS) { return -1; } @@ -119,7 +119,7 @@ int restore_check_mode(const char* uuid) { return 0; } -int restore_check_device(const char* uuid) { +int restore_check_device(const char* udid) { int i = 0; char* type = NULL; char* model = NULL; @@ -130,7 +130,7 @@ int restore_check_device(const char* uuid) { idevice_error_t device_error = IDEVICE_E_SUCCESS; restored_error_t restore_error = RESTORE_E_SUCCESS; - device_error = idevice_new(&device, uuid); + device_error = idevice_new(&device, udid); if (device_error != IDEVICE_E_SUCCESS) { return -1; } @@ -182,7 +182,7 @@ void restore_device_callback(const idevice_event_t* event, void* userdata) { struct idevicerestore_client_t* client = (struct idevicerestore_client_t*) userdata; if (event->event == IDEVICE_DEVICE_ADD) { restore_device_connected = 1; - client->uuid = strdup(event->uuid); + client->udid = strdup(event->udid); } else if (event->event == IDEVICE_DEVICE_REMOVE) { restore_device_connected = 0; client->flags |= FLAG_QUIT; @@ -208,7 +208,7 @@ int restore_reboot(struct idevicerestore_client_t* client) { return 0; } -static int restore_is_current_device(struct idevicerestore_client_t* client, const char* uuid) +static int restore_is_current_device(struct idevicerestore_client_t* client, const char* udid) { if (!client) { return 0; @@ -225,9 +225,9 @@ static int restore_is_current_device(struct idevicerestore_client_t* client, con char *type = NULL; uint64_t version = 0; - device_error = idevice_new(&device, uuid); + device_error = idevice_new(&device, udid); if (device_error != IDEVICE_E_SUCCESS) { - error("ERROR: %s: can't open device with UUID %s", __func__, uuid); + error("ERROR: %s: can't open device with UDID %s", __func__, udid); return 0; } @@ -241,7 +241,7 @@ static int restore_is_current_device(struct idevicerestore_client_t* client, con if ((restore_error == RESTORE_E_SUCCESS) && type && (strcmp(type, "com.apple.mobile.restored") == 0)) { debug("%s: Connected to %s, version %d\n", __func__, type, (int)version); } else { - info("%s: device %s is not in restore mode\n", __func__, uuid); + info("%s: device %s is not in restore mode\n", __func__, udid); restored_client_free(restored); idevice_free(device); return 0; @@ -319,7 +319,7 @@ int restore_open_with_timeout(struct idevicerestore_client_t* client) { for (j = 0; j < num_devices; j++) { if (restore_is_current_device(client, devices[j])) { restore_device_connected = 1; - client->uuid = strdup(devices[j]); + client->udid = strdup(devices[j]); break; } } @@ -343,7 +343,7 @@ int restore_open_with_timeout(struct idevicerestore_client_t* client) { } info("Connecting now\n"); - device_error = idevice_new(&device, client->uuid); + device_error = idevice_new(&device, client->udid); if (device_error != IDEVICE_E_SUCCESS) { return -1; } |