[network-manager-vpnc] editor: omit CA file from configuration if hybrid auth is disabled
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc] editor: omit CA file from configuration if hybrid auth is disabled
- Date: Fri, 26 May 2017 13:15:09 +0000 (UTC)
commit 575570cd463b32b14f74e32f872ea9a0664e9130
Author: Beniamino Galvani <bgalvani redhat com>
Date: Fri May 26 14:39:02 2017 +0200
editor: omit CA file from configuration if hybrid auth is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=783030
properties/nm-vpnc-editor.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/properties/nm-vpnc-editor.c b/properties/nm-vpnc-editor.c
index e8d1269..f266cc3 100644
--- a/properties/nm-vpnc-editor.c
+++ b/properties/nm-vpnc-editor.c
@@ -908,13 +908,14 @@ update_connection (NMVpnEditor *editor,
/* hybrid auth */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "hybrid_checkbutton"));
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_AUTHMODE, "hybrid");
- widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "ca_file_chooser"));
- str = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
- if (str && strlen (str))
- nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_CA_FILE, str);
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "ca_file_chooser"));
+ str = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ if (str && str[0])
+ nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_CA_FILE, str);
+ }
nm_connection_add_setting (connection, NM_SETTING (s_vpn));
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]