summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-10-22 10:07:49 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-22 15:55:32 +0300
commit082a40ecad183cb25aefa25fa2e5aa709531b482 (patch)
treec3257baa0160dac768db2f1c5b3800371d11b197 /src/device.c
parent876529569af8e5cfb7edb4face7b78e55de4ae03 (diff)
downloadconnman-082a40ecad183cb25aefa25fa2e5aa709531b482.tar.gz
connman-082a40ecad183cb25aefa25fa2e5aa709531b482.tar.bz2
connman-082a40ecad183cb25aefa25fa2e5aa709531b482.zip
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.
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c3
1 files changed, 2 insertions, 1 deletions
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);