[network-manager-openvpn/jk/bgo731891-gui-password-types: 4/6] auth-helpers: fix setting http-proxy-password-flags to hash



commit e081e796e590408af567b5e3efca74e8e2320f47
Author: Jiří Klimeš <jklimes redhat com>
Date:   Thu Apr 9 15:12:00 2015 +0200

    auth-helpers: fix setting http-proxy-password-flags to hash
    
    The flags are not properly initialized without that.

 properties/auth-helpers.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 54dc5db..9e4df1a 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -920,7 +920,7 @@ advanced_dialog_new_hash_from_connection (NMConnection *connection,
 {
        GHashTable *hash;
        NMSettingVPN *s_vpn;
-       const char *secret;
+       const char *secret, *flags;
 
        hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
@@ -934,6 +934,11 @@ advanced_dialog_new_hash_from_connection (NMConnection *connection,
                                     g_strdup (NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD),
                                     g_strdup (secret));
        }
+       flags = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags");
+       if (flags)
+               g_hash_table_insert (hash,
+                                    g_strdup (NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags"),
+                                    g_strdup (flags));
 
        return hash;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]