]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-bus/bus-track.c
sd-bus: ensure we don't dispatch track objects while we are adding names to them
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2016 14:09:15 +0000 (16:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2016 14:14:21 +0000 (16:14 +0200)
commit8b6e65ac32627e371ee61f7d086ed33bc47e4b4c
treec5d3392ab75bbac256386cf1deefa743a4cab2b3
parent217fcc7eb3b558e65538cbb42f47b2cb89f2850a
sd-bus: ensure we don't dispatch track objects while we are adding names to them

In order to add a name to a bus tracking object we need to do some bus
operations: we need to check if the name already exists and add match for it.
Both are synchronous bus calls. While processing those we need to make sure
that the tracking object is not dispatched yet, as it might still be empty, but
is not going to be empty for very long.

hence, block dispatching by removing the object from the dispatch queue while
adding it, and readding it on error.
src/libsystemd/sd-bus/bus-track.c