diff options
author | Nikias Bassen | 2013-12-27 01:55:08 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-12-27 01:55:08 +0100 |
commit | 82e5f5764422393eff28aaa8ed35b3ea3db74490 (patch) | |
tree | 0f2aafe75e8233e522af5dc58d6e2d498e4bf501 /src/preflight.h | |
parent | eb9415e18fda0bf394afe8439319a69bbcb196f4 (diff) | |
download | usbmuxd-82e5f5764422393eff28aaa8ed35b3ea3db74490.tar.gz usbmuxd-82e5f5764422393eff28aaa8ed35b3ea3db74490.tar.bz2 |
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.
Diffstat (limited to 'src/preflight.h')
-rw-r--r-- | src/preflight.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/preflight.h b/src/preflight.h index 62349d1..4c8aa60 100644 --- a/src/preflight.h +++ b/src/preflight.h @@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA extern void userpref_get_system_buid(char **systembuid); extern void userpref_device_record_get_host_id(const char *udid, char **host_id); +void preflight_device_remove_cb(void *data); void preflight_worker_device_add(struct device_info* info); #endif |