Permalink
Please sign in to comment.
Browse files
core: rework how we connect to the bus
This removes the current bus_init() call, as it had multiple problems: it munged handling of the three bus connections we care about (private, "api" and system) into one, even though the conditions when which was ready are very different. It also added redundant logging, as the individual calls it called all logged on their own anyway. The three calls bus_init_api(), bus_init_private() and bus_init_system() are now made public. A new call manager_dbus_is_running() is added that works much like manager_journal_is_running() and is a lot more careful when checking whether dbus is around. Optionally it checks the unit's deserialized_state rather than state, in order to accomodate for cases where we cant to connect to the bus before deserializing the "subscribed" list, before coldplugging the units. manager_recheck_dbus() is added, that works a lot like manager_recheck_journal() and is invoked in unit_notify(), i.e. when units change state. All in all this should make handling a bit more alike to journal handling, and it also fixes one major bug: when running in user mode we'll now connect to the system bus early on, without conditionalizing this in anyway.
- Loading branch information...
Showing
with
93 additions
and 77 deletions.
- +3 −23 src/core/dbus.c
- +3 −1 src/core/dbus.h
- +78 −33 src/core/manager.c
- +1 −0 src/core/manager.h
- +8 −20 src/core/unit.c
0 comments on commit
8559b3b