[network-manager-applet/th/validation-error-bgo754832: 11/13] fixup! c-e: forward the validation error to print more sensible error message to stdout
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/th/validation-error-bgo754832: 11/13] fixup! c-e: forward the validation error to print more sensible error message to stdout
- Date: Fri, 11 Sep 2015 08:22:19 +0000 (UTC)
commit 45f3d650d215fed529d58dc5be5d474fd261e4dc
Author: Thomas Haller <thaller redhat com>
Date: Fri Sep 11 10:04:44 2015 +0200
fixup! c-e: forward the validation error to print more sensible error message to stdout
src/wireless-security/eap-method-fast.c | 2 +-
src/wireless-security/eap-method-leap.c | 4 ++--
src/wireless-security/eap-method-peap.c | 4 ++--
src/wireless-security/eap-method-simple.c | 4 ++--
src/wireless-security/eap-method-tls.c | 12 ++++++------
src/wireless-security/eap-method-ttls.c | 4 ++--
src/wireless-security/eap-method.c | 2 +-
7 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/src/wireless-security/eap-method-fast.c b/src/wireless-security/eap-method-fast.c
index fdfa661..d9b0d8c 100644
--- a/src/wireless-security/eap-method-fast.c
+++ b/src/wireless-security/eap-method-fast.c
@@ -68,7 +68,7 @@ validate (EAPMethod *parent, GError **error)
g_assert (widget);
file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
if (!provisioning && !file) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing wpa-eap/fast file"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-FAST PAC file"));
return FALSE;
}
diff --git a/src/wireless-security/eap-method-leap.c b/src/wireless-security/eap-method-leap.c
index cd0e455..599f80f 100644
--- a/src/wireless-security/eap-method-leap.c
+++ b/src/wireless-security/eap-method-leap.c
@@ -59,13 +59,13 @@ validate (EAPMethod *parent, GError **error)
text = gtk_entry_get_text (method->username_entry);
if (!text || !strlen (text)) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing wpa-eap/leap username"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-LEAP username"));
return FALSE;
}
text = gtk_entry_get_text (method->password_entry); {
if (!text || !strlen (text))
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing wpa-eap/leap password"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-LEAP password"));
return FALSE;
}
diff --git a/src/wireless-security/eap-method-peap.c b/src/wireless-security/eap-method-peap.c
index e7a3f4c..73feb8c 100644
--- a/src/wireless-security/eap-method-peap.c
+++ b/src/wireless-security/eap-method-peap.c
@@ -61,12 +61,12 @@ validate (EAPMethod *parent, GError **error)
GError *local = NULL;
if (!eap_method_validate_filepicker (parent->builder, "eap_peap_ca_cert_button", TYPE_CA_CERT, NULL,
NULL, &local)) {
- g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-peap ca-certificate:
%s"), local->message);
+ g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-PEAP CA certificate: %s"),
local->message);
g_clear_error (&local);
return FALSE;
}
if (eap_method_ca_cert_required (parent->builder, "eap_peap_ca_cert_not_required_checkbox",
"eap_peap_ca_cert_button")) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-peap
ca-certificate: missing certificate"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-PEAL CA ertificate:
no certificate specified"));
return FALSE;
}
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index b3fa93d..b13062f 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -68,7 +68,7 @@ validate (EAPMethod *parent, GError **error)
text = gtk_entry_get_text (method->username_entry);
if (!text || !strlen (text)) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing wpa-eap/simple
username"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP username"));
return FALSE;
}
@@ -78,7 +78,7 @@ validate (EAPMethod *parent, GError **error)
text = gtk_entry_get_text (method->password_entry);
if (!text || !strlen (text)) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing wpa-eap/simple
password"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP password"));
return FALSE;
}
diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c
index 73fbb1d..b778f85 100644
--- a/src/wireless-security/eap-method-tls.c
+++ b/src/wireless-security/eap-method-tls.c
@@ -64,17 +64,17 @@ validate (EAPMethod *parent, GError **error)
g_assert (widget);
identity = gtk_entry_get_text (GTK_ENTRY (widget));
if (!identity || !strlen (identity)) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing wpa-eap/tls identity"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("missing EAP-TLS identity"));
return FALSE;
}
if (!eap_method_validate_filepicker (parent->builder, "eap_tls_ca_cert_button", TYPE_CA_CERT, NULL,
NULL, &local)) {
- g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-tls ca-certificate:
%s"), local->message);
+ g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS CA certificate: %s"),
local->message);
g_clear_error (&local);
return FALSE;
}
if (eap_method_ca_cert_required (parent->builder, "eap_tls_ca_cert_not_required_checkbox",
"eap_tls_ca_cert_button")) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-tls
ca-certificate: missing certificate"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS CA certificate:
no certificate specified"));
return FALSE;
}
@@ -82,7 +82,7 @@ validate (EAPMethod *parent, GError **error)
g_assert (widget);
password = gtk_entry_get_text (GTK_ENTRY (widget));
if (!password || !strlen (password)) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-tls password:
missing"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS password:
missing"));
return FALSE;
}
@@ -92,14 +92,14 @@ validate (EAPMethod *parent, GError **error)
password,
&format,
&local)) {
- g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-tls private-key: %s"),
local->message);
+ g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS private-key: %s"),
local->message);
g_clear_error (&local);
return FALSE;
}
if (format != NM_SETTING_802_1X_CK_FORMAT_PKCS12) {
if (!eap_method_validate_filepicker (parent->builder, "eap_tls_user_cert_button",
TYPE_CLIENT_CERT, NULL, NULL, &local)) {
- g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-tls
user-certificate: %s"), local->message);
+ g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TLS
user-certificate: %s"), local->message);
g_clear_error (&local);
return FALSE;
}
diff --git a/src/wireless-security/eap-method-ttls.c b/src/wireless-security/eap-method-ttls.c
index 36e0053..9a76f78 100644
--- a/src/wireless-security/eap-method-ttls.c
+++ b/src/wireless-security/eap-method-ttls.c
@@ -61,12 +61,12 @@ validate (EAPMethod *parent, GError **error)
GError *local = NULL;
if (!eap_method_validate_filepicker (parent->builder, "eap_ttls_ca_cert_button", TYPE_CA_CERT, NULL,
NULL, &local)) {
- g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-ttls ca-certificate:
%s"), local->message);
+ g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TTLS CA certificate: %s"),
local->message);
g_clear_error (&local);
return FALSE;
}
if (eap_method_ca_cert_required (parent->builder, "eap_ttls_ca_cert_not_required_checkbox",
"eap_ttls_ca_cert_button")) {
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid wpa-eap-ttls
ca-certificate: missing certificate"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("invalid EAP-TTLS CA certificate:
no certificate specified"));
return FALSE;
}
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
index 1eecda0..978e0de 100644
--- a/src/wireless-security/eap-method.c
+++ b/src/wireless-security/eap-method.c
@@ -255,7 +255,7 @@ out:
g_free (filename);
if (!success && error && !*error)
- g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("unknown error validating
eap-method file"));
+ g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("unspecified error validating
eap-method file"));
return success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]