From 8e193af7d6bbebb73a6c64b54d8638e317d04ca6 Mon Sep 17 00:00:00 2001 From: Antony Mee Date: Wed, 31 May 2006 02:57:13 +0000 Subject: [PATCH] * fixed segfault on acquiring IP4Config info * use "require-mppe" option instead of "mppe required" which was associated with the mppe-mppc patch rather than the mppe included in pppd >= 2.4.3 and kernel >= 2.6.15 git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1789 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/pptp/src/nm-pptp-service.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vpn-daemons/pptp/src/nm-pptp-service.c b/vpn-daemons/pptp/src/nm-pptp-service.c index 4bef2e9b71..b40a003467 100644 --- a/vpn-daemons/pptp/src/nm-pptp-service.c +++ b/vpn-daemons/pptp/src/nm-pptp-service.c @@ -309,7 +309,7 @@ static void pptp_watch_cb (GPid pid, gint status, gpointer user_data) { error = WEXITSTATUS (status); if (error != 0) - nm_warning ("pptp exited with error code %d", error); + nm_warning ("pptp exited with error code %d", error); } else if (WIFSTOPPED (status)) nm_warning ("pptp stopped unexpectedly with signal %d", WSTOPSIG (status)); @@ -443,11 +443,11 @@ static gint nm_pptp_start_pptp_binary (NmPPTPData *data, char **data_items, cons g_ptr_array_add (pptp_argv, (gpointer) "remotename"); g_ptr_array_add (pptp_argv, (gpointer) data_items[++i]); } else if ( (strcmp( data_items[i], "encrypt-mppe" ) == 0) && - (strcmp( data_items[i], "yes" ) == 0) ) { -// g_ptr_array_add (pptp_argv, (gpointer) "mppe required"); + (strcmp( data_items[++i], "yes" ) == 0) ) { + g_ptr_array_add (pptp_argv, (gpointer) "require-mppe"); } else if ( (strcmp( data_items[i], "comp-mppc" ) == 0) && - (strcmp( data_items[i], "yes" ) == 0) ) { -// g_ptr_array_add (pptp_argv, (gpointer) "mppc required"); + (strcmp( data_items[++i], "yes" ) == 0) ) { + g_ptr_array_add (pptp_argv, (gpointer) "require-mppc"); } } @@ -823,11 +823,11 @@ static void nm_pptp_dbus_process_helper_ip4_config (DBusConnection *con, DBusMes guint32 ip4_address; guint32 ip4_ptp_address; guint32 ip4_netmask; - guint32 * ip4_dns; + guint32 * ip4_dns = NULL; guint32 ip4_dns_len; guint32 ip4_dns1; guint32 ip4_dns2; - guint32 * ip4_nbns; + guint32 * ip4_nbns = NULL; guint32 ip4_nbns_len; guint32 ip4_nbns1; guint32 ip4_nbns2; @@ -909,8 +909,8 @@ static void nm_pptp_dbus_process_helper_ip4_config (DBusConnection *con, DBusMes } out: - if (ip4_nbns) g_free(ip4_nbns); - if (ip4_dns) g_free(ip4_dns); + if (ip4_nbns!=NULL) g_free(ip4_nbns); + if (ip4_dns!=NULL) g_free(ip4_dns); if (!success) { @@ -1103,7 +1103,7 @@ static void sigterm_handler (int signum) { nm_info ("nm-pptp-service caught SIGINT/SIGTERM"); - g_main_loop_quit (vpn_data->loop); +// g_main_loop_quit (vpn_data->loop); }