diff options
Diffstat (limited to 'libusbmuxd/libusbmuxd.c')
| -rw-r--r-- | libusbmuxd/libusbmuxd.c | 26 |
1 files changed, 13 insertions, 13 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 | } |
