chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:52 +0000 (08:50 +0200)
commit8be92e73caedf41af7ec6f3b5b6909507ee0ac5d
tree5bc600216801168605db9d5bcf0d79caa6fd6cbb
parent063c6f2971ed100516b2834d91e938eec6d84024
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/libelogind/sd-bus/bus-track.c