summaryrefslogtreecommitdiffstats
path: root/bus/main.c
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-02-17 09:59:23 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-02-17 09:59:23 +0000
commit3c8db267892bbce5c82d5060cef993dd54dc6ed4 (patch)
tree9560edcebc5bf79b4550611a67505b7677543418 /bus/main.c
parent8faf99b118daf0040a58981cdf24a344ff2578ca (diff)
2003-02-17 Anders Carlsson <andersca@codefactory.se>
* bus/activation.c: (bus_activation_init), (child_setup), (bus_activation_activate_service): * bus/activation.h: * bus/main.c: (main): Set DBUS_ADDRESS environment variable. * dbus/dbus-errors.c: (dbus_set_error): Don't use va_copy since that's a C99 feature. * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec), (_dbus_spawn_async): * dbus/dbus-sysdeps.h: Add child_setup_func to _dbus_spawn_async. * doc/dbus-specification.sgml: Update specification. * test/spawn-test.c: (setup_func), (main): Fix test.
Diffstat (limited to 'bus/main.c')
-rw-r--r--bus/main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/bus/main.c b/bus/main.c
index 68e3a7b9..fdb6462e 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -82,6 +82,15 @@ main (int argc, char **argv)
return 1;
}
+
+ server = dbus_server_listen (argv[1], &result);
+ if (server == NULL)
+ {
+ _dbus_warn ("Failed to start server on %s: %s\n",
+ argv[1], dbus_result_to_string (result));
+ return 1;
+ }
+
if (argc < 3)
{
_dbus_warn ("No service location given, not activating activation\n");
@@ -90,15 +99,7 @@ main (int argc, char **argv)
{
char *paths[] = { argv[2], NULL };
- bus_activation_init (paths);
- }
-
- server = dbus_server_listen (argv[1], &result);
- if (server == NULL)
- {
- _dbus_warn ("Failed to start server on %s: %s\n",
- argv[1], dbus_result_to_string (result));
- return 1;
+ bus_activation_init (argv[1], paths);
}
setup_server (server);