diff options
| author | 2009-07-24 23:51:53 +0200 | |
|---|---|---|
| committer | 2009-07-24 23:51:53 +0200 | |
| commit | 19a28b0ed18c8ca2f855e7d129ddcdb8c939a707 (patch) | |
| tree | a8c3dbfd38705bbe73af53193d4c8cfa224ebee2 /dev | |
| parent | 83529098fbf4b39b2643a7c0bf39828247d11f9a (diff) | |
| download | libimobiledevice-19a28b0ed18c8ca2f855e7d129ddcdb8c939a707.tar.gz libimobiledevice-19a28b0ed18c8ca2f855e7d129ddcdb8c939a707.tar.bz2 | |
Use iphone_device_get_uuid() not lockdown, for less overhead where possible
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/lckdclient.c | 13 | ||||
| -rw-r--r-- | dev/main.c | 14 |
2 files changed, 14 insertions, 13 deletions
diff --git a/dev/lckdclient.c b/dev/lckdclient.c index 820d05f..9518a6e 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c | |||
| @@ -41,17 +41,18 @@ int main(int argc, char *argv[]) | |||
| 41 | return -1; | 41 | return -1; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | char *uuid = NULL; | ||
| 45 | if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) { | ||
| 46 | printf("DeviceUniqueID : %s\n", uuid); | ||
| 47 | } | ||
| 48 | if (uuid) | ||
| 49 | free(uuid); | ||
| 50 | |||
| 44 | if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { | 51 | if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { |
| 45 | iphone_free_device(phone); | 52 | iphone_free_device(phone); |
| 46 | return -1; | 53 | return -1; |
| 47 | } | 54 | } |
| 48 | 55 | ||
| 49 | char *uid = NULL; | ||
| 50 | if (IPHONE_E_SUCCESS == lockdownd_get_device_uid(client, &uid)) { | ||
| 51 | printf("DeviceUniqueID : %s\n", uid); | ||
| 52 | free(uid); | ||
| 53 | } | ||
| 54 | |||
| 55 | using_history(); | 56 | using_history(); |
| 56 | int loop = TRUE; | 57 | int loop = TRUE; |
| 57 | while (loop) { | 58 | while (loop) { |
| @@ -80,19 +80,19 @@ int main(int argc, char *argv[]) | |||
| 80 | return -1; | 80 | return -1; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | char *uuid = NULL; | ||
| 84 | if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) { | ||
| 85 | printf("DeviceUniqueID : %s\n", uuid); | ||
| 86 | } | ||
| 87 | if (uuid) | ||
| 88 | free(uuid); | ||
| 89 | |||
| 83 | if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { | 90 | if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { |
| 84 | iphone_free_device(phone); | 91 | iphone_free_device(phone); |
| 85 | printf("Exiting.\n"); | 92 | printf("Exiting.\n"); |
| 86 | return -1; | 93 | return -1; |
| 87 | } | 94 | } |
| 88 | 95 | ||
| 89 | char *uid = NULL; | ||
| 90 | if (IPHONE_E_SUCCESS == lockdownd_get_device_uid(client, &uid)) { | ||
| 91 | printf("DeviceUniqueID : %s\n", uid); | ||
| 92 | free(uid); | ||
| 93 | } | ||
| 94 | |||
| 95 | |||
| 96 | char *nnn = NULL; | 96 | char *nnn = NULL; |
| 97 | if (IPHONE_E_SUCCESS == lockdownd_get_device_name(client, &nnn)) { | 97 | if (IPHONE_E_SUCCESS == lockdownd_get_device_name(client, &nnn)) { |
| 98 | printf("DeviceName : %s\n", nnn); | 98 | printf("DeviceName : %s\n", nnn); |
