chiark / gitweb /
bus: make bus_map_all_properties() call idempotent
[elogind.git] / src / libsystemd-bus / bus-objects.c
index 31d761e2154a98b18ef3e7432fb57b5481f15bc6..05d0015902075850c6ce0b13480b63365a3dd038 100644 (file)
@@ -585,7 +585,7 @@ static int property_get_all_callbacks_run(
 
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
         struct node_vtable *c;
-        bool found_interface = false;
+        bool found_interface;
         int r;
 
         assert(bus);
@@ -600,6 +600,11 @@ static int property_get_all_callbacks_run(
         if (r < 0)
                 return r;
 
+        found_interface = !iface ||
+                streq(iface, "org.freedesktop.DBus.Properties") ||
+                streq(iface, "org.freedesktop.DBus.Peer") ||
+                streq(iface, "org.freedesktop.DBus.Introspectable");
+
         LIST_FOREACH(vtables, c, first) {
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
                 void *u;
@@ -1614,7 +1619,7 @@ static int add_object_vtable_internal(
                 case _SD_BUS_VTABLE_SIGNAL:
 
                         if (!member_name_is_valid(v->x.signal.member) ||
-                            !signature_is_single(strempty(v->x.signal.signature), false)) {
+                            !signature_is_valid(strempty(v->x.signal.signature), false)) {
                                 r = -EINVAL;
                                 goto fail;
                         }