Don't try to re-connect to networks out of range
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jan 2009 20:43:53 +0000 (21:43 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jan 2009 20:43:53 +0000 (21:43 +0100)
src/device.c

index a2b8f6f120da5f7b0ef5290a798bea68e36be064..b9ed1f513b55596dc30937750108cbfa3a14e8c9 100644 (file)
@@ -1066,6 +1066,9 @@ static void connect_known_network(struct connman_device *device)
 
                count++;
 
+               if (connman_network_get_available(value) == FALSE)
+                       continue;
+
                name = connman_network_get_string(value, "Name");
                if (name != NULL && device->last_network != NULL) {
                        if (g_str_equal(name, device->last_network) == TRUE) {