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 a2b8f6f..b9ed1f5 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) {