diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-bus/bus-objects.c | 4 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-objects.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c index 2eaa7de306..b3cc28ee9b 100644 --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/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; diff --git a/src/libsystemd/sd-bus/test-bus-objects.c b/src/libsystemd/sd-bus/test-bus-objects.c index 52952603e4..1db67ecfac 100644 --- a/src/libsystemd/sd-bus/test-bus-objects.c +++ b/src/libsystemd/sd-bus/test-bus-objects.c @@ -115,14 +115,13 @@ 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(x = startswith(path, "/value/")); + assert_se(startswith(path, "/value/") != NULL || strcmp(path, "/value") == 0); assert_se(PTR_TO_UINT(userdata) == 30); |