From 082a40ecad183cb25aefa25fa2e5aa709531b482 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Mon, 22 Oct 2012 10:07:49 +0300 Subject: [PATCH] device: Do not mark connecting networks unavailable When autoscan fallback code is started, it sets scanning to true which in turn marks all networks unavailable except for the ones that are already connected. When connecting during an ongoing autoscan, the connection attempt stops autoscan and all unavailable networks are removed, also the one to be connected. The fix is to ignore both connected and connecting networks when marking networks unavailable. --- src/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 9f88dfa9..fc374f50 100644 --- a/src/device.c +++ b/src/device.c @@ -660,7 +660,8 @@ static void mark_network_unavailable(gpointer key, gpointer value, { struct connman_network *network = value; - if (connman_network_get_connected(network) == TRUE) + if (connman_network_get_connected(network) == TRUE || + connman_network_get_connecting(network) == TRUE) return; connman_network_set_available(network, FALSE); -- 2.34.1