summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-03-30 18:34:14 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-03-30 18:34:14 +0200
commit6eb6b23b28ff1513834d0282a2888c7251b068a2 (patch)
tree266425298801423a4c484af28a4b7b33583763a3
parentb044b306d2c331693364add222e783658fa4dad4 (diff)
downloadNetworkManager-6eb6b23b28ff1513834d0282a2888c7251b068a2.tar.gz
cli: fix setting of 802-1x.eap property
Fixes: 6bf1d6fc163de9f69338af99641bd49f246f32b7
-rw-r--r--clients/common/nm-meta-setting-desc.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index f8a376cbfe..dab414a900 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -1817,6 +1817,20 @@ _get_fcn_802_1x_phase2_private_key (ARGS_GET_FCN)
return success; \
}
+DEFINE_SETTER_STR_LIST_MULTI (check_and_add_eap_method,
+ NM_SETTING_802_1X,
+ nm_setting_802_1x_add_eap_method)
+
+static gboolean
+_set_fcn_802_1x_eap (ARGS_SET_FCN)
+{
+ return check_and_add_eap_method (setting,
+ property_info->property_name,
+ value,
+ (const char **) property_info->property_typ_data->values_static,
+ error);
+}
+
static gboolean
_validate_and_remove_eap_method (NMSetting8021x *setting,
const char *eap,
@@ -1824,7 +1838,7 @@ _validate_and_remove_eap_method (NMSetting8021x *setting,
{
gboolean ret;
- ret = nm_setting_802_1x_remove_eap_method_by_value(setting, eap);
+ ret = nm_setting_802_1x_remove_eap_method_by_value (setting, eap);
if (!ret)
g_set_error (error, 1, 0, _("the property doesn't contain EAP method '%s'"), eap);
return ret;
@@ -4594,7 +4608,7 @@ static const NMMetaPropertyInfo property_infos_802_1x[] = {
PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_EAP),
.property_type = DEFINE_PROPERTY_TYPE (
.get_fcn = _get_fcn_gobject,
- .set_fcn = _set_fcn_gobject_string,
+ .set_fcn = _set_fcn_802_1x_eap,
.remove_fcn = _remove_fcn_802_1x_eap,
),
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (