]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: when installing a match make sure not to apply it to already queued messages
authorLennart Poettering <lennart@poettering.net>
Fri, 29 Mar 2019 14:43:40 +0000 (15:43 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2019 10:18:51 +0000 (12:18 +0200)
commit6b39223cd3d5af24c0077207c633a47ae8f7d80d
tree15a7c5baefd5cdff6110d5f70aef4a19ecb54ff7
parent3cf8dd5359ad01eb5c291d2f12c33e84fb2c70b9
sd-bus: when installing a match make sure not to apply it to already queued messages

This tweaks match installation a bit: the match callbacks are now only
called for messages read after the AddMatch() reply was received and
never anything already read before. Thus, installing a match gives you a
time guarantee: only messages received after it will be matched.

This is useful when listening to PropertiesChanged signals as an example
to ensure that only changes after the point the match was installed are
honoured, nothing before.
src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/bus-control.h
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-bus/sd-bus.c