diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-06-02 04:08:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-09 19:47:23 +0200 |
commit | b3ed8675a4eba35c6a7f43a86a89f706ffe07f84 (patch) | |
tree | 9bc3db75ced3dd8d5da9eb5266a714f81add3986 /bus/bus.c | |
parent | 921bc585ca44b02684d368058a8df8300342dcd0 (diff) | |
download | dbus-b3ed8675a4eba35c6a7f43a86a89f706ffe07f84.tar.gz |
activation: optionally, use systemd for system bus activation
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -60,6 +60,7 @@ struct BusContext unsigned int syslog : 1; unsigned int keep_umask : 1; unsigned int allow_anonymous : 1; + unsigned int systemd_activation : 1; }; static dbus_int32_t server_data_slot = -1; @@ -276,6 +277,7 @@ static dbus_bool_t process_config_first_time_only (BusContext *context, BusConfigParser *parser, const DBusString *address, + dbus_bool_t systemd_activation, DBusError *error) { DBusString log_prefix; @@ -292,6 +294,8 @@ process_config_first_time_only (BusContext *context, retval = FALSE; auth_mechanisms = NULL; + context->systemd_activation = systemd_activation; + /* Check for an existing pid file. Of course this is a race; * we'd have to use fcntl() locks on the pid file to * avoid that. But we want to check for the pid file @@ -652,6 +656,7 @@ bus_context_new (const DBusString *config_file, DBusPipe *print_addr_pipe, DBusPipe *print_pid_pipe, const DBusString *address, + dbus_bool_t systemd_activation, DBusError *error) { DBusString log_prefix; @@ -706,7 +711,7 @@ bus_context_new (const DBusString *config_file, goto failed; } - if (!process_config_first_time_only (context, parser, address, error)) + if (!process_config_first_time_only (context, parser, address, systemd_activation, error)) { _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; @@ -1084,6 +1089,12 @@ bus_context_get_servicehelper (BusContext *context) return context->servicehelper; } +dbus_bool_t +bus_context_get_systemd_activation (BusContext *context) +{ + return context->systemd_activation; +} + BusRegistry* bus_context_get_registry (BusContext *context) { |