]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-util: actually register the object manager
authorLennart Poettering <lennart@poettering.net>
Wed, 20 May 2020 16:07:23 +0000 (18:07 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 May 2020 21:39:30 +0000 (23:39 +0200)
src/shared/bus-util.c

index c7611a6e851db1db5293463169e67689f0ba7388..379aecf73078697bbbcdfbc9a9f52cd4d5dd2107 100644 (file)
@@ -1591,6 +1591,12 @@ int bus_add_implementation(sd_bus *bus, const BusObjectImplementation *impl, voi
                                                impl->path);
         }
 
+        if (impl->manager) {
+                r = sd_bus_add_object_manager(bus, NULL, impl->path);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to add object manager for %s: %m", impl->path);
+        }
+
         for (size_t i = 0; impl->children && impl->children[i]; i++) {
                 r = bus_add_implementation(bus, impl->children[i], userdata);
                 if (r < 0)