From 4e637dcb37540463bc57b9e7ab33fcd011b91728 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Tue, 16 Oct 2012 08:35:17 +0300 Subject: [PATCH] wifi: Do not start autoscan if interface was not ready --- plugins/wifi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index 2984de0..631d0cc 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -516,7 +516,10 @@ static void scan_callback(int result, GSupplicantInterface *interface, connman_device_reset_scanning(device); connman_device_set_scanning(device, FALSE); - start_autoscan(device); + + if (result != -ENOLINK) + start_autoscan(device); + connman_device_unref(device); } -- 2.7.4