]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
core: dbus: track bus names per unit 894/head
authorDaniel Mack <daniel@zonque.org>
Wed, 5 Aug 2015 15:47:45 +0000 (17:47 +0200)
committerDaniel Mack <daniel@zonque.org>
Thu, 6 Aug 2015 08:14:41 +0000 (10:14 +0200)
commitbbc2908635ca3ded9162504683fa126809f0ec14
treed667bb2afaaef914cbc262e3b6e4220325722bbf
parentd5972272d2b725ab6a2789899f8b6c1d2a8113e3
core: dbus: track bus names per unit

Currently, PID1 installs an unfiltered NameOwnerChanged signal match, and
dispatches the signals itself. This does not scale, as right now, PID1
wakes up every time a bus client connects.

To fix this, install individual matches once they are requested by
unit_watch_bus_name(), and remove the watches again through their slot in
unit_unwatch_bus_name().

If the bus is not available during unit_watch_bus_name(), just store
name in the 'watch_bus' hashmap, and let bus_setup_api() do the installing
later.
src/core/dbus.c
src/core/manager.c
src/core/manager.h
src/core/unit.c
src/core/unit.h