1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 11:55:23 +03:00

Revert "sd-bus: include queried path in GetManagedObjects"

This reverts commit 92d16a53e3. As it turns
out, this is not how ObjectManager is supposed to work. It is just a
special behavior of BlueZ, but no-one else implements it this way.

Revert the patch as discussed on github, and as such revert to the
previous behavior (as described in the spec).
This commit is contained in:
David Herrmann 2015-08-24 12:56:37 +02:00
parent 1667eda96f
commit f2196cf2e2
2 changed files with 2 additions and 5 deletions

View File

@ -1175,10 +1175,6 @@ 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;

View File

@ -114,13 +114,14 @@ static int set_handler(sd_bus *bus, const char *path, const char *interface, con
static int value_handler(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) {
_cleanup_free_ char *s = NULL;
const char *x;
int r;
assert_se(asprintf(&s, "object %p, path %s", userdata, path) >= 0);
r = sd_bus_message_append(reply, "s", s);
assert_se(r >= 0);
assert_se(startswith(path, "/value/") != NULL || strcmp(path, "/value") == 0);
assert_se(x = startswith(path, "/value/"));
assert_se(PTR_TO_UINT(userdata) == 30);