core: delay bus name synchronization after reload/reexec into a later event loop...
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Feb 2018 21:36:51 +0000 (22:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 12 Feb 2018 10:34:00 +0000 (11:34 +0100)
commit5f109056d536849f6079df9321042cf4838a41d3
treef815f6bc9dd645854f10b4ef6d2f6c7cb91b2372
parent030fa56c6eb1d9bd4c12ba4604934c592dcf180e
core: delay bus name synchronization after reload/reexec into a later event loop iteration

Previously, we'd synchronize bus names immediately when we succeeded
connecting to the bus, potentially even before coldplugging the units.
This was problematic, as synchronizing bus names meant invoking the
per-unit name change handler function which might change the unit's
state — which will result in consistency when done before we coldplug
things.

With this change we instead enqueue a job for the event loop to resync
the names in a later loop iteration, i.e. at a point where we know
coldplugging has finished.
src/core/dbus.c
src/core/dbus.h
src/core/manager.c
src/core/manager.h