device: check avaliable connections are really available

The nm_device_check_connection_available() call seem to have been accidentally
removed from nm_device_recheck_available_connections() resulting in all
connections always being added.

Fixes 02ec76df5a
This commit is contained in:
Lubomir Rintel 2016-02-15 21:10:26 +01:00
parent 7bb491c84e
commit 8b2abe0e2c

View file

@ -9354,10 +9354,15 @@ nm_device_recheck_available_connections (NMDevice *self)
for (iter = connections; iter; iter = g_slist_next (iter)) {
connection = NM_CONNECTION (iter->data);
if (available_connections_add (self, connection)) {
if (prune_list)
g_hash_table_remove (prune_list, connection);
changed = TRUE;
if (nm_device_check_connection_available (self,
connection,
NM_DEVICE_CHECK_CON_AVAILABLE_NONE,
NULL)) {
if (available_connections_add (self, connection))
changed = TRUE;
} else {
if (prune_list && g_hash_table_remove (prune_list, connection))
changed = TRUE;
}
}