summaryrefslogtreecommitdiffstats
path: root/libusbmuxd
diff options
context:
space:
mode:
Diffstat (limited to 'libusbmuxd')
-rw-r--r--libusbmuxd/libusbmuxd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c
index 02aa750..4c94dc2 100644
--- a/libusbmuxd/libusbmuxd.c
+++ b/libusbmuxd/libusbmuxd.c
@@ -551,6 +551,10 @@ int get_next_event(int sfd, usbmuxd_event_cb_t callback, void *user_data)
memset(devinfo->uuid, '\0', sizeof(devinfo->uuid));
memcpy(devinfo->uuid, dev->serial_number, sizeof(devinfo->uuid));
+ if (strcasecmp(devinfo->uuid, "ffffffffffffffffffffffffffffffffffffffff") == 0) {
+ sprintf(devinfo->uuid + 32, "%08x", devinfo->handle);
+ }
+
collection_add(&devices, devinfo);
generate_event(callback, devinfo, UE_DEVICE_ADD, user_data);
} else if (hdr.message == MESSAGE_DEVICE_REMOVE) {
@@ -720,6 +724,10 @@ retry:
memset(devinfo->uuid, '\0', sizeof(devinfo->uuid));
memcpy(devinfo->uuid, dev->serial_number, sizeof(devinfo->uuid));
+ if (strcasecmp(devinfo->uuid, "ffffffffffffffffffffffffffffffffffffffff") == 0) {
+ sprintf(devinfo->uuid + 32, "%08x", devinfo->handle);
+ }
+
collection_add(&tmpdevs, devinfo);
} else if (hdr.message == MESSAGE_DEVICE_REMOVE) {