diff options
Diffstat (limited to 'libusbmuxd')
| -rw-r--r-- | libusbmuxd/libusbmuxd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c index d375dd6..f074a5d 100644 --- a/libusbmuxd/libusbmuxd.c +++ b/libusbmuxd/libusbmuxd.c | |||
| @@ -194,11 +194,10 @@ int get_next_event(int sfd, usbmuxd_event_cb_t callback, void *user_data) | |||
| 194 | // when then usbmuxd connection fails, | 194 | // when then usbmuxd connection fails, |
| 195 | // generate remove events for every device that | 195 | // generate remove events for every device that |
| 196 | // is still present so applications know about it | 196 | // is still present so applications know about it |
| 197 | // TODO: is this behaviour correct? | ||
| 198 | FOREACH(usbmuxd_device_info_t *dev, &devices) { | 197 | FOREACH(usbmuxd_device_info_t *dev, &devices) { |
| 199 | generate_event(callback, dev, UE_DEVICE_REMOVE, user_data); | 198 | generate_event(callback, dev, UE_DEVICE_REMOVE, user_data); |
| 199 | collection_remove(&devices, dev); | ||
| 200 | } ENDFOREACH | 200 | } ENDFOREACH |
| 201 | collection_free(&devices); | ||
| 202 | return recv_len; | 201 | return recv_len; |
| 203 | } else if (recv_len == sizeof(hdr)) { | 202 | } else if (recv_len == sizeof(hdr)) { |
| 204 | if (hdr.message == MESSAGE_DEVICE_ADD) { | 203 | if (hdr.message == MESSAGE_DEVICE_ADD) { |
