1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

miracled: skip run-time device-monitor if running unmanaged

If we get ADD events from udev for a new link but run in unmanaged mode,
skip the event. It is fairly unlikely that another manager has already
started wpa_supplicant on it (and even if, it would be racy).

Hence, lets not support hotplugging in these cases until external managers
provide us a notification API.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
David Herrmann 2014-02-17 16:50:20 +01:00
parent fe571fb729
commit fc30d8b920

View file

@ -138,7 +138,7 @@ static int manager_udev_fn(sd_event_source *source,
if (!action)
goto out;
if (!strcmp(action, "add"))
if (!strcmp(action, "add") && arg_manage_wifi)
manager_add_link_from_udev(m, d);
else if (!strcmp(action, "remove"))
manager_remove_link_from_udev(m, d);