[gnome-control-center] network: Avoid setting a GError if already set
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Avoid setting a GError if already set
- Date: Tue, 30 Aug 2016 15:18:17 +0000 (UTC)
commit 2a6706fe4cae955591a2f160639c1e0b05b86c34
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jun 14 14:12:26 2016 +0200
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
.../network/connection-editor/ce-page-security.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-security.c
b/panels/network/connection-editor/ce-page-security.c
index 041afcd..9789c75 100644
--- a/panels/network/connection-editor/ce-page-security.c
+++ b/panels/network/connection-editor/ce-page-security.c
@@ -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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]