summaryrefslogtreecommitdiff
path: root/clients/common
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-31 15:49:20 +0200
committerThomas Haller <thaller@redhat.com>2019-05-31 15:52:29 +0200
commit403f207fe58538f0228ac42918f23d2e6a18e8b6 (patch)
tree42c5801144bca3ce29740a8cc9d667a7909a62ff /clients/common
parent5cf6cfd99946dc896099e93079a91fc4ba4b896d (diff)
downloadNetworkManager-403f207fe58538f0228ac42918f23d2e6a18e8b6.tar.gz
cli: fix resetting default value for GObject property
This matters for properties that don't have 0/NULL/FALSE as default value and when setting an empty property with $ nmcli connection modify "$PROFILE" setting.property '' Fixes: 3c82db710f50 ('cli: reset default value of properties via set_fcn()')
Diffstat (limited to 'clients/common')
-rw-r--r--clients/common/nm-meta-setting-desc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index b4cfcb40e0..c252832d35 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -762,7 +762,7 @@ _gobject_property_reset (NMSetting *setting,
g_value_init (&v, pspec->value_type);
if (reset_default)
- g_param_value_defaults (pspec, &v);
+ g_param_value_set_default (pspec, &v);
g_object_set_property (G_OBJECT (setting), prop_name, &v);
return TRUE;
}