Commit 2a6706fe authored by Bastien Nocera's avatar Bastien Nocera
Browse files

network: Avoid setting a GError if already set

If the wireless security is invalid, don't try to set the GError if the
ad-hoc mode is invalid as well.

https://bugzilla.gnome.org/show_bug.cgi?id=769230
parent b0329f8e
......@@ -399,7 +399,8 @@ validate (CEPage *page,
if (CE_PAGE_SECURITY (page)->adhoc) {
if (!wireless_security_adhoc_compatible (sec)) {
g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_SETTING, "Security not compatible with Ad-Hoc mode");
if (valid)
g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_SETTING, "Security not compatible with Ad-Hoc mode");
valid = FALSE;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment