summary refs log tree commit diff
path: root/src/ppp-manager/nm-ppp-manager.c
diff options
context:
space:
mode:
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");