chiark / gitweb /
sd-bus: add new sd_bus_set_connected_signal() API
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Dec 2017 14:50:05 +0000 (15:50 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:59 +0000 (07:49 +0200)
commit5d9d26d4c87636a611c4bb40c71fec60eaea8a8e
tree40c75ca8a056b8069fb292c10fb7ded977f5c986
parent15196ff2d3e084b05e60c2ff61f71d1ff40bb3a5
sd-bus: add new sd_bus_set_connected_signal() API

With this new API sd-bus can synthesize a local "Connected" signal when
the connection is fully established. It mirrors the local "Disconnected"
signal that is already generated when the connection is terminated. This
is useful to be notified when connection setup is done, in order to
start method calls then, in particular when using "slow" connection
methods (for example slow TCP, or most importantly the "watch_bind"
inotify logic).

Note that one could also use hook into the initial NameAcquired signal
received from the bus broker, but that scheme works only if we actually
connect to a bus. The benefit of "Connected" OTOH is that it works with
any kind of connection.

Ideally, we'd just generate this message unconditionally, but in order
not to break clients that do not expect this message it is opt-in.
src/libelogind/libelogind.sym
src/libelogind/sd-bus/bus-internal.h
src/libelogind/sd-bus/sd-bus.c