chiark / gitweb /
bus: add sd_bus_track object for tracking peers, and port core over to it
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Mar 2014 00:33:45 +0000 (01:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 3 Mar 2014 01:34:13 +0000 (02:34 +0100)
This is primarily useful for services that need to track clients which
reference certain objects they maintain, or which explicitly want to
subscribe to certain events. Something like this is done in a large
number of services, and not trivial to do. Hence, let's unify this at
one place.

This also ports over PID 1 to use this to ensure that subscriptions to
job and manager events are correctly tracked. As a side-effect this
makes sure we properly serialize and restore the track list across
daemon reexec/reload, which didn't work correctly before.

This also simplifies how we distribute messages to broadcast to the
direct busses: we only track subscriptions for the API bus and
implicitly assume that all direct busses are subscribed. This should be
a pretty OK simplification since clients connected via direct bus
connections are shortlived anyway.


No differences found