From 82e5f5764422393eff28aaa8ed35b3ea3db74490 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 27 Dec 2013 01:55:08 +0100 Subject: preflight: replace idevice_event_* with thread safe implementation idevice_event_subscribe() calls usbmuxd_subscribe() which will start a thread waiting for device add/remove events. But this implementation is not able to handle more than one "subscription". However the preflight worker will start a thread for _each_ device resulting in a really messed up situation if more than one device is attached at the same time. This fix will use usbmuxd's internal device_remove function calling a preflight callback to make this implementation thread safe. --- src/device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/device.h') diff --git a/src/device.h b/src/device.h index d7c82ca..95d470e 100644 --- a/src/device.h +++ b/src/device.h @@ -41,6 +41,7 @@ void device_client_process(int device_id, struct mux_client *client, short event void device_abort_connect(int device_id, struct mux_client *client); void device_set_visible(int device_id); +void device_set_preflight_cb_data(int device_id, void* data); int device_get_count(int include_hidden); int device_get_list(int include_hidden, struct device_info *p); -- cgit v1.1-32-gdbae