[patch] fix openvpn's hashtable warning and crash when edit configuration



Hi,

Index: NetworkManager/vpn-daemons/openvpn/properties/nm-openvpn.c
===================================================================
--- NetworkManager.orig/vpn-daemons/openvpn/properties/nm-openvpn.c
+++ NetworkManager/vpn-daemons/openvpn/properties/nm-openvpn.c
@@ -256,6 +256,12 @@ impl_fill_connection (NetworkManagerVpnU

        s_vpn_props = NM_SETTING_VPN_PROPERTIES
(nm_connection_get_setting (connection,
NM_TYPE_SETTING_VPN_PROPERTIES));
        g_return_if_fail (s_vpn_props != NULL);
+
+       /* create new hash table for vpn's properties */
+       s_vpn_props->data = g_hash_table_new(g_str_hash, g_str_equal);
+
+       g_return_if_fail (s_vpn_props->data != NULL);
+
        properties = s_vpn_props->data;

        /* Connection name */


-- 
Sincerely Yours,

Charles Li

http://cn.opensuse.org
Index: NetworkManager/vpn-daemons/openvpn/properties/nm-openvpn.c
===================================================================
--- NetworkManager.orig/vpn-daemons/openvpn/properties/nm-openvpn.c
+++ NetworkManager/vpn-daemons/openvpn/properties/nm-openvpn.c
@@ -256,6 +256,12 @@ impl_fill_connection (NetworkManagerVpnU
 
 	s_vpn_props = NM_SETTING_VPN_PROPERTIES (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN_PROPERTIES));
 	g_return_if_fail (s_vpn_props != NULL);
+
+	/* create new hash table for vpn's properties */
+	s_vpn_props->data = g_hash_table_new(g_str_hash, g_str_equal);
+
+	g_return_if_fail (s_vpn_props->data != NULL);
+
 	properties = s_vpn_props->data;
 
 	/* Connection name */


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