[network-manager-applet/th/ca_cert_ignore: 2/2] applet: remove wrong assert in eap_method_ca_cert_not_required_toggled
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/th/ca_cert_ignore: 2/2] applet: remove wrong assert in eap_method_ca_cert_not_required_toggled
- Date: Wed, 16 Oct 2013 14:17:58 +0000 (UTC)
commit dcc0207cd7ed3ea6bc13acaac8aee806644eda46
Author: Thomas Haller <thaller redhat com>
Date: Mon Oct 7 17:47:04 2013 +0200
applet: remove wrong assert in eap_method_ca_cert_not_required_toggled
With the previous commit, the "Connect" button in the "Connect to Hidden
Network" is disabled, if the EAP connection does not validate.
Before, the user was able to click on the "Connect" button and the
assert in eap_method_ca_cert_not_required_toggled failed.
Still, the assert is too strict, so remove it.
Also fix an invalid warning in eap-method-tls.c
Signed-off-by: Thomas Haller <thaller redhat com>
src/wireless-security/eap-method-peap.c | 2 +-
src/wireless-security/eap-method-tls.c | 4 ++--
src/wireless-security/eap-method-ttls.c | 2 +-
src/wireless-security/eap-method.c | 10 +---------
src/wireless-security/eap-method.h | 3 +--
5 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/src/wireless-security/eap-method-peap.c b/src/wireless-security/eap-method-peap.c
index f8ef35b..932ae25 100644
--- a/src/wireless-security/eap-method-peap.c
+++ b/src/wireless-security/eap-method-peap.c
@@ -164,7 +164,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection)
g_clear_error (&error);
ca_cert_error = TRUE;
}
- eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error,
"eap_peap_ca_cert_not_required_checkbox");
+ eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error);
g_free (filename);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_version_combo"));
diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c
index afe8c06..b57d1ed 100644
--- a/src/wireless-security/eap-method-tls.c
+++ b/src/wireless-security/eap-method-tls.c
@@ -234,7 +234,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection)
ca_cert_error = TRUE;
}
}
- eap_method_ca_cert_ignore_set (parent, connection, ca_filename, ca_cert_error,
"eap_tls_ca_cert_not_required_checkbox");
+ eap_method_ca_cert_ignore_set (parent, connection, ca_filename, ca_cert_error);
g_free (ca_filename);
}
@@ -471,7 +471,7 @@ eap_method_tls_new (WirelessSecurity *ws_parent,
phase2 ? nm_setting_802_1x_get_phase2_private_key_path :
nm_setting_802_1x_get_private_key_path,
TRUE, FALSE);
- if (eap_method_ca_cert_ignore_get (parent, connection)) {
+ if (connection && eap_method_ca_cert_ignore_get (parent, connection)) {
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_ca_cert_button"));
ca_not_required = !gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
}
diff --git a/src/wireless-security/eap-method-ttls.c b/src/wireless-security/eap-method-ttls.c
index e8c9e4d..8d45865 100644
--- a/src/wireless-security/eap-method-ttls.c
+++ b/src/wireless-security/eap-method-ttls.c
@@ -159,7 +159,7 @@ fill_connection (EAPMethod *parent, NMConnection *connection)
g_clear_error (&error);
ca_cert_error = TRUE;
}
- eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error,
"eap_ttls_ca_cert_not_required_checkbox");
+ eap_method_ca_cert_ignore_set (parent, connection, filename, ca_cert_error);
g_free (filename);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_combo"));
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
index 3f17715..bdd67d0 100644
--- a/src/wireless-security/eap-method.c
+++ b/src/wireless-security/eap-method.c
@@ -527,8 +527,6 @@ eap_method_ca_cert_not_required_toggled (GtkBuilder *builder, const char *id_ca_
* @filename: the certificate file, if any
* @ca_cert_error: %TRUE if an error was encountered loading the given CA
* certificate, %FALSE if not or if a CA certificate is not present
- * @id_ca_cert_is_not_required_checkbox: the #GtkWidget object name of the
- * "CA certificate not required" checkbox
*
* Updates the connection's CA cert ignore value to %TRUE if the "CA certificate
* not required" checkbox is checked. If @ca_cert_error is %TRUE, then the
@@ -540,17 +538,11 @@ void
eap_method_ca_cert_ignore_set (EAPMethod *method,
NMConnection *connection,
const char *filename,
- gboolean ca_cert_error,
- const char *id_ca_cert_is_not_required_checkbox)
+ gboolean ca_cert_error)
{
- GtkWidget *widget;
NMSetting8021x *s_8021x;
gboolean ignore;
- /* We don't really need the checkbox value here. Just assert that it is set as expected. */
- widget = GTK_WIDGET (gtk_builder_get_object (method->builder, id_ca_cert_is_not_required_checkbox));
- g_assert (widget && (ca_cert_error || !filename == gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
(widget))));
-
s_8021x = nm_connection_get_setting_802_1x (connection);
if (s_8021x) {
ignore = !ca_cert_error && filename == NULL;
diff --git a/src/wireless-security/eap-method.h b/src/wireless-security/eap-method.h
index 2186584..0dd6c63 100644
--- a/src/wireless-security/eap-method.h
+++ b/src/wireless-security/eap-method.h
@@ -124,8 +124,7 @@ void eap_method_ca_cert_not_required_toggled (GtkBuilder *builder,
void eap_method_ca_cert_ignore_set (EAPMethod *method,
NMConnection *connection,
const char *filename,
- gboolean ca_cert_error,
- const char *id_ca_cert_is_not_required_checkbox);
+ gboolean ca_cert_error);
gboolean eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection);
void eap_method_ca_cert_ignore_save (NMConnection *connection);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]