Fix dbus logging

We were adding the --log option in the wrong spot of the dbus-proxy
commandline, causing it to a) not accept it and b) spew a warning.
tingping/wmclass
Matthias Clasen 2016-07-28 09:06:23 -04:00
parent d245ba3574
commit 772d2ab562
1 changed files with 5 additions and 1 deletions

View File

@ -2571,6 +2571,7 @@ add_dbus_proxy_args (GPtrArray *argv_array,
{
char x = 'x';
const char *proxy;
g_autofree char *commandline = NULL;
if (dbus_proxy_argv->len == 0)
return TRUE;
@ -2597,10 +2598,13 @@ add_dbus_proxy_args (GPtrArray *argv_array,
g_ptr_array_insert (dbus_proxy_argv, 0, g_strdup (proxy));
g_ptr_array_insert (dbus_proxy_argv, 1, g_strdup_printf ("--fd=%d", sync_fds[1]));
if (enable_logging)
g_ptr_array_insert (dbus_proxy_argv, 2, g_strdup ("--log"));
g_ptr_array_add (dbus_proxy_argv, g_strdup ("--log"));
g_ptr_array_add (dbus_proxy_argv, NULL); /* NULL terminate */
commandline = g_strjoinv (" ", (char **) dbus_proxy_argv->pdata);
g_debug ("Running %s", commandline);
if (!g_spawn_async (NULL,
(char **) dbus_proxy_argv->pdata,
NULL,