]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: fix object tree to be deeper than 2 levels
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 15 Jul 2015 12:35:15 +0000 (14:35 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 15 Jul 2015 12:39:12 +0000 (14:39 +0200)
commit7d67077f78d4a43f214c240359ad5f7284d086fa
tree898f0b419db587665c2385421f19d35cd3a04528
parentbf4c113e179650c07a8f95a14d71f365dbfe66e4
sd-bus: fix object tree to be deeper than 2 levels

So right now our object-tree is limited to 2 levels at most
('/' and '/foo/...../bar'). We never link any intermediate levels, even
though that was clearly the plan. Fix the bus_node_allocate() helper to
actually link all intermediate nodes, too, not just the root node.

This fixes a simple inverse ptr-diff bug.

The downside of this fix is that we clearly never tested (nor used) the
object tree in any way. The only reason that the introspection works is
that our enumerators shortcut the object tree.

Lets see whether that code actually works..

Thanks to: Nathaniel McCallum <nathaniel@themccallums.org>
..for reporting this. See #524 for an actual example code.
src/libsystemd/sd-bus/bus-objects.c