summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-07-24 23:51:53 +0200
committerGravatar Martin Szulecki2009-07-24 23:51:53 +0200
commit19a28b0ed18c8ca2f855e7d129ddcdb8c939a707 (patch)
treea8c3dbfd38705bbe73af53193d4c8cfa224ebee2 /dev
parent83529098fbf4b39b2643a7c0bf39828247d11f9a (diff)
downloadlibimobiledevice-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.c13
-rw-r--r--dev/main.c14
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[])
return -1;
}
+ char *uuid = NULL;
+ if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) {
+ printf("DeviceUniqueID : %s\n", uuid);
+ }
+ if (uuid)
+ free(uuid);
+
if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) {
iphone_free_device(phone);
return -1;
}
- char *uid = NULL;
- if (IPHONE_E_SUCCESS == lockdownd_get_device_uid(client, &uid)) {
- printf("DeviceUniqueID : %s\n", uid);
- free(uid);
- }
-
using_history();
int loop = TRUE;
while (loop) {
diff --git a/dev/main.c b/dev/main.c
index 9c8b155..46c5557 100644
--- a/dev/main.c
+++ b/dev/main.c
@@ -80,19 +80,19 @@ int main(int argc, char *argv[])
return -1;
}
+ char *uuid = NULL;
+ if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) {
+ printf("DeviceUniqueID : %s\n", uuid);
+ }
+ if (uuid)
+ free(uuid);
+
if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) {
iphone_free_device(phone);
printf("Exiting.\n");
return -1;
}
- char *uid = NULL;
- if (IPHONE_E_SUCCESS == lockdownd_get_device_uid(client, &uid)) {
- printf("DeviceUniqueID : %s\n", uid);
- free(uid);
- }
-
-
char *nnn = NULL;
if (IPHONE_E_SUCCESS == lockdownd_get_device_name(client, &nnn)) {
printf("DeviceName : %s\n", nnn);