[network-manager-pptp] core: lower default pptp log level; all NM_PPTP_DEBUG for more (bgo #622761)



commit 36d6e9ac2d80bcde2839586df2dbde579f3c8136
Author: Dan Williams <dcbw redhat com>
Date:   Sat Jun 26 10:39:44 2010 -0700

    core: lower default pptp log level; all NM_PPTP_DEBUG for more (bgo #622761)

 src/nm-pptp-service.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-pptp-service.c b/src/nm-pptp-service.c
index 1bc869d..5bbda7b 100644
--- a/src/nm-pptp-service.c
+++ b/src/nm-pptp-service.c
@@ -678,6 +678,8 @@ construct_pppd_args (NMPptpPlugin *plugin,
 	GPtrArray *args = NULL;
 	const char *value, *pptp_binary;
 	char *ipparam, *tmp;
+	const char *loglevel0 = "--loglevel 0";
+	const char *loglevel2 = "--loglevel 2";
 
 	pptp_binary = nm_find_pptp ();
 	if (!pptp_binary) {
@@ -706,7 +708,10 @@ construct_pppd_args (NMPptpPlugin *plugin,
 	ipparam = g_strdup_printf ("nm-pptp-service-%d", getpid ());
 
 	g_ptr_array_add (args, (gpointer) g_strdup ("pty"));
-	tmp = g_strdup_printf ("%s %s --nolaunchpppd --logstring %s", pptp_binary, value, ipparam);
+	tmp = g_strdup_printf ("%s %s --nolaunchpppd %s --logstring %s",
+	                       pptp_binary, value,
+	                       getenv ("NM_PPTP_DEBUG") ? loglevel2 : loglevel0,
+	                       ipparam);
 	g_ptr_array_add (args, (gpointer) tmp);
 
 	if (getenv ("NM_PPP_DEBUG"))



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