diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-09 13:27:57 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:06:01 +0100 |
commit | ab76853a4ca68ec371c971dfe2cc68f19fe07659 (patch) | |
tree | ef9c4345c7ac04b655e3aa966adaab95ab57720f /src/libelogind/sd-bus/bus-objects.c | |
parent | 8e2ad2f59c4d49d6fe22e84c9408d4a17465bc00 (diff) |
sd-bus: include queried path in GetManagedObjects
If GetManagedObjects is called on /foo/bar, then it should also include
the object /foo/bar, if it exists. Right now, we only include objects
underneath /foo/bar/.
This follows the behavior of existing dbus implementations.
Obsoletes #527 and fixes #525. Reported by: Nathaniel McCallum
Diffstat (limited to 'src/libelogind/sd-bus/bus-objects.c')
-rw-r--r-- | src/libelogind/sd-bus/bus-objects.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libelogind/sd-bus/bus-objects.c b/src/libelogind/sd-bus/bus-objects.c index 2eaa7de30..b3cc28ee9 100644 --- a/src/libelogind/sd-bus/bus-objects.c +++ b/src/libelogind/sd-bus/bus-objects.c @@ -1164,6 +1164,10 @@ static int process_get_managed_objects( if (bus->nodes_modified) return 0; + r = set_put_strdup(s, m->path); + if (r < 0) + return r; + r = sd_bus_message_new_method_return(m, &reply); if (r < 0) return r; |