summaryrefslogtreecommitdiff
path: root/libnm-util/nm-connection.c
diff options
context:
space:
mode:
authorPavel Šimerda <psimerda@redhat.com>2013-07-31 16:58:41 +0200
committerPavel Šimerda <psimerda@redhat.com>2013-08-22 22:06:47 +0200
commit2a4a359eb1c87fab51277ed774baa2a39dc88226 (patch)
tree0718af69f0e24733b653034632aba7a0a719e046 /libnm-util/nm-connection.c
parent155ec4c38215d1491d9d31a9e47096a260fa7631 (diff)
downloadNetworkManager-2a4a359eb1c87fab51277ed774baa2a39dc88226.tar.gz
libnm-util: add NM_SETTING_COMPARE_FLAG_CANDIDATE flag
Acked-by: Dan Winship <danw@gnome.org> Acked-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'libnm-util/nm-connection.c')
-rw-r--r--libnm-util/nm-connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index dac66c4767..1cd81db5e5 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -448,10 +448,13 @@ nm_connection_compare (NMConnection *a,
if (!a && !b)
return TRUE;
-
if (!a || !b)
return FALSE;
+ /* CANDIDATE flag also implies FUZZY */
+ if (flags & NM_SETTING_COMPARE_FLAG_CANDIDATE)
+ flags |= NM_SETTING_COMPARE_FLAG_FUZZY;
+
/* A / B: ensure all settings in A match corresponding ones in B */
g_hash_table_iter_init (&iter, NM_CONNECTION_GET_PRIVATE (a)->settings);
while (g_hash_table_iter_next (&iter, NULL, (gpointer) &src)) {