[patch] fix openvpn's hashtable warning and crash when edit configuration
- From: "Charles Li" <libin charles gmail com>
- To: networkmanager-list gnome org
- Subject: [patch] fix openvpn's hashtable warning and crash when edit configuration
- Date: Tue, 5 Feb 2008 11:07:50 +0800
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]