[network-manager-openvpn/dcbw/openvpn-restart: 3/5] core: print executed openvpn command-line when debug logging is enabled



commit 486305557d9de5052cc4c40465d59771193bec1c
Author: Dan Williams <dcbw redhat com>
Date:   Fri Oct 17 12:38:31 2014 -0500

    core: print executed openvpn command-line when debug logging is enabled

 src/nm-openvpn-service.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 4af69cb..1b76956 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -1259,6 +1259,13 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
 
        g_ptr_array_add (args, NULL);
 
+       if (debug) {
+               char *cmd = g_strjoinv (" ", (char **) args->pdata);
+
+               g_message ("EXEC: '%s'", cmd);
+               g_free (cmd);
+       }
+
        if (!g_spawn_async (NULL, (char **) args->pdata, NULL,
                            G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, error)) {
                free_openvpn_args (args);


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