diff options
| author | 2012-04-08 00:36:40 +0200 | |
|---|---|---|
| committer | 2012-04-08 00:36:40 +0200 | |
| commit | f45d7032ec6be2efdb3d1045fb491c266acebc2f (patch) | |
| tree | a1d137dd05a60d8161a58c542bef006d94567404 | |
| parent | 53d2f8a495fe9baaff7695da02a39476cd5d2d6f (diff) | |
| download | usbmuxd-f45d7032ec6be2efdb3d1045fb491c266acebc2f.tar.gz usbmuxd-f45d7032ec6be2efdb3d1045fb491c266acebc2f.tar.bz2 | |
replace uuid by udid, which is the correct term for it
| -rw-r--r-- | libusbmuxd/libusbmuxd.c | 26 | ||||
| -rw-r--r-- | libusbmuxd/usbmuxd.h | 8 | ||||
| -rw-r--r-- | tools/iproxy.c | 2 |
3 files changed, 18 insertions, 18 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c index 6d4504b..0623b90 100644 --- a/libusbmuxd/libusbmuxd.c +++ b/libusbmuxd/libusbmuxd.c | |||
| @@ -548,11 +548,11 @@ int get_next_event(int sfd, usbmuxd_event_cb_t callback, void *user_data) | |||
| 548 | 548 | ||
| 549 | devinfo->handle = dev->device_id; | 549 | devinfo->handle = dev->device_id; |
| 550 | devinfo->product_id = dev->product_id; | 550 | devinfo->product_id = dev->product_id; |
| 551 | memset(devinfo->uuid, '\0', sizeof(devinfo->uuid)); | 551 | memset(devinfo->udid, '\0', sizeof(devinfo->udid)); |
| 552 | memcpy(devinfo->uuid, dev->serial_number, sizeof(devinfo->uuid)); | 552 | memcpy(devinfo->udid, dev->serial_number, sizeof(devinfo->udid)); |
| 553 | 553 | ||
| 554 | if (strcasecmp(devinfo->uuid, "ffffffffffffffffffffffffffffffffffffffff") == 0) { | 554 | if (strcasecmp(devinfo->udid, "ffffffffffffffffffffffffffffffffffffffff") == 0) { |
| 555 | sprintf(devinfo->uuid + 32, "%08x", devinfo->handle); | 555 | sprintf(devinfo->udid + 32, "%08x", devinfo->handle); |
| 556 | } | 556 | } |
| 557 | 557 | ||
| 558 | collection_add(&devices, devinfo); | 558 | collection_add(&devices, devinfo); |
| @@ -733,11 +733,11 @@ retry: | |||
| 733 | 733 | ||
| 734 | devinfo->handle = dev->device_id; | 734 | devinfo->handle = dev->device_id; |
| 735 | devinfo->product_id = dev->product_id; | 735 | devinfo->product_id = dev->product_id; |
| 736 | memset(devinfo->uuid, '\0', sizeof(devinfo->uuid)); | 736 | memset(devinfo->udid, '\0', sizeof(devinfo->udid)); |
| 737 | memcpy(devinfo->uuid, dev->serial_number, sizeof(devinfo->uuid)); | 737 | memcpy(devinfo->udid, dev->serial_number, sizeof(devinfo->udid)); |
| 738 | 738 | ||
| 739 | if (strcasecmp(devinfo->uuid, "ffffffffffffffffffffffffffffffffffffffff") == 0) { | 739 | if (strcasecmp(devinfo->udid, "ffffffffffffffffffffffffffffffffffffffff") == 0) { |
| 740 | sprintf(devinfo->uuid + 32, "%08x", devinfo->handle); | 740 | sprintf(devinfo->udid + 32, "%08x", devinfo->handle); |
| 741 | } | 741 | } |
| 742 | 742 | ||
| 743 | collection_add(&tmpdevs, devinfo); | 743 | collection_add(&tmpdevs, devinfo); |
| @@ -799,7 +799,7 @@ int usbmuxd_device_list_free(usbmuxd_device_info_t **device_list) | |||
| 799 | return 0; | 799 | return 0; |
| 800 | } | 800 | } |
| 801 | 801 | ||
| 802 | int usbmuxd_get_device_by_uuid(const char *uuid, usbmuxd_device_info_t *device) | 802 | int usbmuxd_get_device_by_udid(const char *udid, usbmuxd_device_info_t *device) |
| 803 | { | 803 | { |
| 804 | usbmuxd_device_info_t *dev_list = NULL; | 804 | usbmuxd_device_info_t *dev_list = NULL; |
| 805 | 805 | ||
| @@ -813,17 +813,17 @@ int usbmuxd_get_device_by_uuid(const char *uuid, usbmuxd_device_info_t *device) | |||
| 813 | int i; | 813 | int i; |
| 814 | int result = 0; | 814 | int result = 0; |
| 815 | for (i = 0; dev_list[i].handle > 0; i++) { | 815 | for (i = 0; dev_list[i].handle > 0; i++) { |
| 816 | if (!uuid) { | 816 | if (!udid) { |
| 817 | device->handle = dev_list[i].handle; | 817 | device->handle = dev_list[i].handle; |
| 818 | device->product_id = dev_list[i].product_id; | 818 | device->product_id = dev_list[i].product_id; |
| 819 | strcpy(device->uuid, dev_list[i].uuid); | 819 | strcpy(device->udid, dev_list[i].udid); |
| 820 | result = 1; | 820 | result = 1; |
| 821 | break; | 821 | break; |
| 822 | } | 822 | } |
| 823 | if (!strcmp(uuid, dev_list[i].uuid)) { | 823 | if (!strcmp(udid, dev_list[i].udid)) { |
| 824 | device->handle = dev_list[i].handle; | 824 | device->handle = dev_list[i].handle; |
| 825 | device->product_id = dev_list[i].product_id; | 825 | device->product_id = dev_list[i].product_id; |
| 826 | strcpy(device->uuid, dev_list[i].uuid); | 826 | strcpy(device->udid, dev_list[i].udid); |
| 827 | result = 1; | 827 | result = 1; |
| 828 | break; | 828 | break; |
| 829 | } | 829 | } |
diff --git a/libusbmuxd/usbmuxd.h b/libusbmuxd/usbmuxd.h index eabd216..b8283d6 100644 --- a/libusbmuxd/usbmuxd.h +++ b/libusbmuxd/usbmuxd.h | |||
| @@ -38,7 +38,7 @@ extern "C" { | |||
| 38 | typedef struct { | 38 | typedef struct { |
| 39 | int handle; | 39 | int handle; |
| 40 | int product_id; | 40 | int product_id; |
| 41 | char uuid[41]; | 41 | char udid[41]; |
| 42 | } usbmuxd_device_info_t; | 42 | } usbmuxd_device_info_t; |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| @@ -104,9 +104,9 @@ int usbmuxd_get_device_list(usbmuxd_device_info_t **device_list); | |||
| 104 | int usbmuxd_device_list_free(usbmuxd_device_info_t **device_list); | 104 | int usbmuxd_device_list_free(usbmuxd_device_info_t **device_list); |
| 105 | 105 | ||
| 106 | /** | 106 | /** |
| 107 | * Gets device information for the device specified by uuid. | 107 | * Gets device information for the device specified by udid. |
| 108 | * | 108 | * |
| 109 | * @param uuid A device uuid of the device to look for. If uuid is NULL, | 109 | * @param udid A device UDID of the device to look for. If udid is NULL, |
| 110 | * This function will return the first device found. | 110 | * This function will return the first device found. |
| 111 | * @param device Pointer to a previously allocated (or static) | 111 | * @param device Pointer to a previously allocated (or static) |
| 112 | * usbmuxd_device_info_t that will be filled with the device info. | 112 | * usbmuxd_device_info_t that will be filled with the device info. |
| @@ -114,7 +114,7 @@ int usbmuxd_device_list_free(usbmuxd_device_info_t **device_list); | |||
| 114 | * @return 0 if no matching device is connected, 1 if the device was found, | 114 | * @return 0 if no matching device is connected, 1 if the device was found, |
| 115 | * or a negative value on error. | 115 | * or a negative value on error. |
| 116 | */ | 116 | */ |
| 117 | int usbmuxd_get_device_by_uuid(const char *uuid, usbmuxd_device_info_t *device); | 117 | int usbmuxd_get_device_by_udid(const char *udid, usbmuxd_device_info_t *device); |
| 118 | 118 | ||
| 119 | /** | 119 | /** |
| 120 | * Request proxy connect to | 120 | * Request proxy connect to |
diff --git a/tools/iproxy.c b/tools/iproxy.c index 0bc38fb..e4e39f6 100644 --- a/tools/iproxy.c +++ b/tools/iproxy.c | |||
| @@ -192,7 +192,7 @@ void *acceptor_thread(void *arg) | |||
| 192 | return NULL; | 192 | return NULL; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | fprintf(stdout, "Requesting connecion to device handle == %d (serial: %s), port %d\n", dev_list[0].handle, dev_list[0].uuid, device_port); | 195 | fprintf(stdout, "Requesting connecion to device handle == %d (serial: %s), port %d\n", dev_list[0].handle, dev_list[0].udid, device_port); |
| 196 | 196 | ||
| 197 | cdata->sfd = usbmuxd_connect(dev_list[0].handle, device_port); | 197 | cdata->sfd = usbmuxd_connect(dev_list[0].handle, device_port); |
| 198 | free(dev_list); | 198 | free(dev_list); |
