diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-06-19 03:15:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-06-19 03:15:59 +0200 |
commit | a3d4e06dfa234bf2a9398c8e534b705b68aa50a1 (patch) | |
tree | 41d9a99c9827fa9fac302c15c382ae6dc941a40c /src/dbus.c | |
parent | 5e8d1c9a9f15b7453474dc4879bdb4021c3f50a1 (diff) |
manager: get rid of destinction between running_as=system and running_as=init, as there is little value in it and we cannot really test this
Diffstat (limited to 'src/dbus.c')
-rw-r--r-- | src/dbus.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dbus.c b/src/dbus.c index a34c7dc17b..74b1c37dda 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -761,7 +761,7 @@ static int bus_init_system(Manager *m) { if (m->system_bus) return 0; - if (m->running_as != MANAGER_SESSION && m->api_bus) + if (m->running_as == MANAGER_SYSTEM && m->api_bus) m->system_bus = m->api_bus; else { if (!(m->system_bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) { @@ -819,7 +819,7 @@ static int bus_init_api(Manager *m) { if (m->api_bus) return 0; - if (m->running_as != MANAGER_SESSION && m->system_bus) + if (m->running_as == MANAGER_SYSTEM && m->system_bus) m->api_bus = m->system_bus; else { if (!(m->api_bus = dbus_bus_get_private(m->running_as == MANAGER_SESSION ? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM, &error))) { @@ -914,7 +914,7 @@ static int bus_init_private(Manager *m) { return 0; /* We want the private bus only when running as init */ - if (m->running_as != MANAGER_INIT) + if (m->running_as != MANAGER_SYSTEM) return 0; if (!(m->private_bus = dbus_server_listen("unix:abstract=/org/freedesktop/systemd1/private", &error))) { @@ -1348,11 +1348,11 @@ int bus_broadcast(Manager *m, DBusMessage *message) { assert(message); SET_FOREACH(c, m->bus_connections_for_dispatch, i) - if (c != m->system_bus || m->running_as != MANAGER_SESSION) + if (c != m->system_bus || m->running_as == MANAGER_SYSTEM) oom = !dbus_connection_send(c, message, NULL); SET_FOREACH(c, m->bus_connections, i) - if (c != m->system_bus || m->running_as != MANAGER_SESSION) + if (c != m->system_bus || m->running_as == MANAGER_SYSTEM) oom = !dbus_connection_send(c, message, NULL); return oom ? -ENOMEM : 0; |