path: root/plugins/wifi.c
diff options
authorGrant Erickson <>2013-03-25 09:20:38 -0700
committerPatrik Flykt <>2013-03-27 15:39:37 +0200
commitec3eca317f9431dd394f62942c9a23404b6cecfe (patch)
tree8936fc4800c0a50f3cb4a6ce319ad5f5270afae0 /plugins/wifi.c
parentd7d8f8bdb7c1ddae098893e10608fcb42034a9ff (diff)
wifi: terminate autoscan stop if autoscan is not active
This terminates the body of stop_autoscan if autoscan is not active. Per MEEGO-25987 <>, running stop_autoscan when changing connected services can prematurely and incorrectly terminate a new, in-flight service connection and result in a failure of that connection with "net.connman.Error.OperationAborted: Operation aborted". When a scan is started, all networks are marked unavailable. Should the check added in this patch not be present, device scanning is set to false and all not yet found networks are removed. Thus the service will not be able to connect if its network wasn't already found.
Diffstat (limited to 'plugins/wifi.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index dd79cd35..a0cb966a 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -233,6 +233,11 @@ static void reset_autoscan(struct connman_device *device)
static void stop_autoscan(struct connman_device *device)
+ const struct wifi_data *wifi = connman_device_get_data(device);
+ if (wifi == NULL || wifi->autoscan == NULL)
+ return;
connman_device_set_scanning(device, FALSE);