summary refs log tree commit diff
path: root/src/ppp-manager/nm-ppp-manager.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-05-27 19:57:25 +0200
committerMichael Biebl <biebl@debian.org>2011-05-27 19:57:25 +0200
commitd465e5fac63f36bcf4069e36827f4b62c494556d (patch)
tree65f4ba9567e091233cdf3279f7ba3c9479e74a1c /src/ppp-manager/nm-ppp-manager.c
parent9f806e97a24bba61417ae312fcc0da40914266fb (diff)
Imported Upstream version 0.8.9997 upstream/0.8.9997
Diffstat (limited to 'src/ppp-manager/nm-ppp-manager.c')
-rw-r--r--src/ppp-manager/nm-ppp-manager.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 767b9315..e863aaba 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -798,7 +798,7 @@ create_pppd_cmd_line (NMPPPManager *self,
 	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (self);
 	const char *ppp_binary;
 	NMCmdLine *cmd;
-	const char *ppp_debug;
+	gboolean ppp_debug;
 
 	g_return_val_if_fail (setting != NULL, NULL);
 
@@ -819,7 +819,11 @@ create_pppd_cmd_line (NMPPPManager *self,
 	/* NM handles setting the default route */
 	nm_cmd_line_add_string (cmd, "nodefaultroute");
 
-	ppp_debug = getenv ("NM_PPP_DEBUG");
+	ppp_debug = !!getenv ("NM_PPP_DEBUG");
+	if (   nm_logging_level_enabled (LOGL_DEBUG)
+	    && nm_logging_domain_enabled (LOGD_PPP))
+		ppp_debug = TRUE;
+
 	if (ppp_debug)
 		nm_cmd_line_add_string (cmd, "debug");