mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 15:28:03 +02:00
merge: branch 'bg/macsec-display-ckn'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/739
This commit is contained in:
commit
3f4765f30e
1 changed files with 18 additions and 10 deletions
|
|
@ -100,7 +100,7 @@ nm_supplicant_config_add_option_with_type(NMSupplicantConfig *self,
|
||||||
const char * value,
|
const char * value,
|
||||||
gint32 len,
|
gint32 len,
|
||||||
NMSupplOptType opt_type,
|
NMSupplOptType opt_type,
|
||||||
const char * hidden,
|
const char * display_value,
|
||||||
GError ** error)
|
GError ** error)
|
||||||
{
|
{
|
||||||
NMSupplicantConfigPrivate *priv;
|
NMSupplicantConfigPrivate *priv;
|
||||||
|
|
@ -138,7 +138,7 @@ nm_supplicant_config_add_option_with_type(NMSupplicantConfig *self,
|
||||||
NM_SUPPLICANT_ERROR_CONFIG,
|
NM_SUPPLICANT_ERROR_CONFIG,
|
||||||
"key '%s' and/or value %s invalid",
|
"key '%s' and/or value %s invalid",
|
||||||
key,
|
key,
|
||||||
hidden ?: str);
|
display_value ?: str);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -165,7 +165,10 @@ nm_supplicant_config_add_option_with_type(NMSupplicantConfig *self,
|
||||||
char buf[255];
|
char buf[255];
|
||||||
memset(&buf[0], 0, sizeof(buf));
|
memset(&buf[0], 0, sizeof(buf));
|
||||||
memcpy(&buf[0], opt->value, opt->len > 254 ? 254 : opt->len);
|
memcpy(&buf[0], opt->value, opt->len > 254 ? 254 : opt->len);
|
||||||
nm_log_info(LOGD_SUPPLICANT, "Config: added '%s' value '%s'", key, hidden ?: &buf[0]);
|
nm_log_info(LOGD_SUPPLICANT,
|
||||||
|
"Config: added '%s' value '%s'",
|
||||||
|
key,
|
||||||
|
display_value ?: &buf[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hash_table_insert(priv->config, g_strdup(key), opt);
|
g_hash_table_insert(priv->config, g_strdup(key), opt);
|
||||||
|
|
@ -178,7 +181,7 @@ nm_supplicant_config_add_option(NMSupplicantConfig *self,
|
||||||
const char * key,
|
const char * key,
|
||||||
const char * value,
|
const char * value,
|
||||||
gint32 len,
|
gint32 len,
|
||||||
const char * hidden,
|
const char * display_value,
|
||||||
GError ** error)
|
GError ** error)
|
||||||
{
|
{
|
||||||
return nm_supplicant_config_add_option_with_type(self,
|
return nm_supplicant_config_add_option_with_type(self,
|
||||||
|
|
@ -186,7 +189,7 @@ nm_supplicant_config_add_option(NMSupplicantConfig *self,
|
||||||
value,
|
value,
|
||||||
len,
|
len,
|
||||||
NM_SUPPL_OPT_TYPE_INVALID,
|
NM_SUPPL_OPT_TYPE_INVALID,
|
||||||
hidden,
|
display_value,
|
||||||
error);
|
error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -455,7 +458,7 @@ nm_supplicant_config_add_setting_macsec(NMSupplicantConfig *self,
|
||||||
"mka_ckn",
|
"mka_ckn",
|
||||||
(char *) buffer_ckn,
|
(char *) buffer_ckn,
|
||||||
sizeof(buffer_ckn),
|
sizeof(buffer_ckn),
|
||||||
NULL,
|
value,
|
||||||
error))
|
error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
@ -633,7 +636,7 @@ add_string_val(NMSupplicantConfig *self,
|
||||||
const char * field,
|
const char * field,
|
||||||
const char * name,
|
const char * name,
|
||||||
gboolean ucase,
|
gboolean ucase,
|
||||||
const char * hidden,
|
const char * display_value,
|
||||||
GError ** error)
|
GError ** error)
|
||||||
{
|
{
|
||||||
if (field) {
|
if (field) {
|
||||||
|
|
@ -643,7 +646,12 @@ add_string_val(NMSupplicantConfig *self,
|
||||||
value = g_ascii_strup(field, -1);
|
value = g_ascii_strup(field, -1);
|
||||||
field = value;
|
field = value;
|
||||||
}
|
}
|
||||||
return nm_supplicant_config_add_option(self, name, field, strlen(field), hidden, error);
|
return nm_supplicant_config_add_option(self,
|
||||||
|
name,
|
||||||
|
field,
|
||||||
|
strlen(field),
|
||||||
|
display_value,
|
||||||
|
error);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -656,7 +664,7 @@ add_string_val(NMSupplicantConfig *self,
|
||||||
name, \
|
name, \
|
||||||
separator, \
|
separator, \
|
||||||
ucase, \
|
ucase, \
|
||||||
hidden, \
|
display_value, \
|
||||||
error) \
|
error) \
|
||||||
({ \
|
({ \
|
||||||
typeof(*(setting)) *_setting = (setting); \
|
typeof(*(setting)) *_setting = (setting); \
|
||||||
|
|
@ -685,7 +693,7 @@ add_string_val(NMSupplicantConfig *self,
|
||||||
(name), \
|
(name), \
|
||||||
_str->str, \
|
_str->str, \
|
||||||
-1, \
|
-1, \
|
||||||
(hidden), \
|
(display_value), \
|
||||||
(error))) \
|
(error))) \
|
||||||
_success = FALSE; \
|
_success = FALSE; \
|
||||||
} \
|
} \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue