summaryrefslogtreecommitdiff
path: root/src/nm-core-utils.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-02-05 16:24:27 +0100
committerThomas Haller <thaller@redhat.com>2017-02-10 14:43:24 +0100
commit93f7ab2c54096461bf03e3adf56955a681c95946 (patch)
tree485b7f1cc2bb138405cc4a9423f1e868a2ce92ce /src/nm-core-utils.c
parenta8221323990c80fa4ad585388b213788f12917c9 (diff)
downloadNetworkManager-93f7ab2c54096461bf03e3adf56955a681c95946.tar.gz
core: consolidate sorting of connections by autoconnect/timestamp
NMPolicy's auto_activate_device() wants to sort by autoconnect-priority, nm_utils_cmp_connection_by_autoconnect_priority() but fallback to the default nm_settings_connection_cmp_default(), which includes the timestamp. Extend nm_settings_connection_cmp_default() to consider the autoconnect-priority as well. Thus change behavior so that nm_settings_connection_cmp_default() is the sort order that auto_activate_device() wants. That makes sense, as nm_settings_connection_cmp_default() already considered the ability to autoconnect as first. Hence, it should also honor the autoconnect priority. When doing that, rename nm_settings_connection_cmp_default() to nm_settings_connection_cmp_autoconnect_priority().
Diffstat (limited to 'src/nm-core-utils.c')
-rw-r--r--src/nm-core-utils.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index 143fdfe8b9..75c44b7865 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -2030,15 +2030,6 @@ nm_utils_cmp_connection_by_autoconnect_priority (NMConnection *a, NMConnection *
return 0;
}
-int
-nm_utils_cmp_connection_by_autoconnect_priority_p_with_data (gconstpointer pa, gconstpointer pb, gpointer user_data)
-{
- nm_assert (pa);
- nm_assert (pb);
- return nm_utils_cmp_connection_by_autoconnect_priority (*((NMConnection **) pa),
- *((NMConnection **) pb));
-}
-
/*****************************************************************************/
static gint64 monotonic_timestamp_offset_sec;