about summary refs log tree commit diff
path: root/src/ppp-manager
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-05-27 19:57:41 +0200
committerMichael Biebl <biebl@debian.org>2011-05-27 19:57:41 +0200
commit8529df552804e5cd05ac785f658cd16ab56f7247 (patch)
tree30af064ab23262d7eed0c6f44e41c37a94d7911a /src/ppp-manager
parentf537c885beb1336d5d497d6261f2d2d8223a57e7 (diff)
parentd465e5fac63f36bcf4069e36827f4b62c494556d (diff)
Merge commit 'upstream/0.8.9997' into experimental
Diffstat (limited to 'src/ppp-manager')
-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");