summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index adb8d72185..77b042c2a0 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -429,6 +429,12 @@ find_ac_for_connection (NMManager *manager, NMConnection *connection)
return NULL;
}
+/* Filter out connections that are already active.
+ * nm_settings_get_connections() returns sorted list. We need to preserve the
+ * order so that we didn't change auto-activation order (recent timestamps
+ * are first).
+ * Caller is responsible for freeing the returned list with g_slist_free().
+ */
GSList *
nm_manager_get_activatable_connections (NMManager *manager)
{
@@ -445,7 +451,7 @@ nm_manager_get_activatable_connections (NMManager *manager)
}
g_slist_free (all_connections);
- return connections;
+ return g_slist_reverse (connections);
}
static NMActiveConnection *