network: Return better error when 8021x security is invalid
Rather than the generic "Invalid 802.1x security". https://bugzilla.gnome.org/show_bug.cgi?id=769230
This commit is contained in:
parent
73a8d38946
commit
b0329f8ef6
1 changed files with 2 additions and 3 deletions
|
@ -124,7 +124,7 @@ validate (CEPage *cepage, NMConnection *connection, GError **error)
|
||||||
NMSetting *s_8021x;
|
NMSetting *s_8021x;
|
||||||
|
|
||||||
/* FIXME: get failed property and error out of wireless security objects */
|
/* FIXME: get failed property and error out of wireless security objects */
|
||||||
valid = wireless_security_validate (page->security, NULL);
|
valid = wireless_security_validate (page->security, error);
|
||||||
if (valid) {
|
if (valid) {
|
||||||
NMSetting *s_con;
|
NMSetting *s_con;
|
||||||
|
|
||||||
|
@ -144,8 +144,7 @@ validate (CEPage *cepage, NMConnection *connection, GError **error)
|
||||||
nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
|
nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
|
||||||
|
|
||||||
g_object_unref (tmp_connection);
|
g_object_unref (tmp_connection);
|
||||||
} else
|
}
|
||||||
g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_SETTING, "Invalid 802.1x security");
|
|
||||||
} else {
|
} else {
|
||||||
nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X);
|
nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X);
|
||||||
valid = TRUE;
|
valid = TRUE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue