summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-06-22 03:37:11 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-06-22 03:37:11 +0000
commit85330d203f2ec30d6e46ad91087dcd20a051be9e (patch)
tree1845314b1a5e8090531df7ed06116dd8a3cdfc14
parenta7a78009cae0f94cff8d16430522a8901d1c4b90 (diff)
Use direct connection only in standalone mode
-rw-r--r--daemon/echo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/echo.c b/daemon/echo.c
index eb1d384b..1dedacca 100644
--- a/daemon/echo.c
+++ b/daemon/echo.c
@@ -408,7 +408,11 @@ int main(int argc, char *argv[])
main_loop = g_main_loop_new(NULL, FALSE);
- conn = init_dbus_direct(addr);
+ if (argc > 1 && !strcmp(argv[1], "-s"))
+ conn = init_dbus_direct(addr);
+ else
+ conn = init_dbus(NULL, NULL, NULL);
+
if (!conn) {
error("Connection to bus failed");
g_main_loop_unref(main_loop);