summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libnm-util/nm-setting.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
index 7921483ca0..a0e287339b 100644
--- a/libnm-util/nm-setting.c
+++ b/libnm-util/nm-setting.c
@@ -699,22 +699,19 @@ nm_setting_diff (NMSetting *a,
continue;
if (b) {
- g_value_init (&a_value, prop_spec->value_type);
- g_object_get_property (G_OBJECT (a), prop_spec->name, &a_value);
-
- g_value_init (&b_value, prop_spec->value_type);
- g_object_get_property (G_OBJECT (b), prop_spec->name, &b_value);
-
- different = !!g_param_values_cmp (prop_spec, &a_value, &b_value);
+ different = !NM_SETTING_GET_CLASS (a)->compare_property (a, b, prop_spec, flags);
if (different) {
+ g_value_init (&a_value, prop_spec->value_type);
+ g_value_init (&b_value, prop_spec->value_type);
+
if (!g_param_value_defaults (prop_spec, &a_value))
r |= a_result;
if (!g_param_value_defaults (prop_spec, &b_value))
r |= b_result;
- }
- g_value_unset (&a_value);
- g_value_unset (&b_value);
+ g_value_unset (&a_value);
+ g_value_unset (&b_value);
+ }
} else
r = a_result; /* only in A */