commit f6f08f9b96914eea1831437bcf5eb922c5045944
parent 249a1ef1c0218f5b418f2f3d2e3c65821b21643b
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 12 Aug 2021 13:38:07 -0700
station: disable autoconnect when in developer mode
Most autotests do not want autoconnect behavior so it is being
turned off by default. There are a few tests where it is needed
and in these few cases the test can enable autoconnect through
the new station debug property.
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/station.c b/src/station.c
@@ -3507,6 +3507,7 @@ static struct station *station_create(struct netdev *netdev)
{
struct station *station;
struct l_dbus *dbus = dbus_get_bus();
+ bool autoconnect = true;
station = l_new(struct station, 1);
watchlist_init(&station->state_watches, NULL);
@@ -3524,8 +3525,6 @@ static struct station *station_create(struct netdev *netdev)
l_queue_push_head(station_list, station);
- station_set_autoconnect(station, true);
-
l_dbus_object_add_interface(dbus, netdev_get_path(netdev),
IWD_STATION_INTERFACE, station);
@@ -3536,11 +3535,15 @@ static struct station *station_create(struct netdev *netdev)
station_fill_scan_freq_subsets(station);
- if (iwd_is_developer_mode())
+ if (iwd_is_developer_mode()) {
l_dbus_object_add_interface(dbus,
netdev_get_path(station->netdev),
IWD_STATION_DEBUG_INTERFACE,
station);
+ autoconnect = false;
+ }
+
+ station_set_autoconnect(station, autoconnect);
return station;
}