chiark / gitweb /
bus: properly handle if new objects are installed in the node tree while we are dispa...
[elogind.git] / src / libsystemd-bus / bus-control.c
index 66f713082c1eaf9a42b7970996f926d01a09ac02..0ba85858052fb13bce89ba9c6c8974d2ce661dcb 100644 (file)
@@ -75,7 +75,7 @@ int sd_bus_request_name(sd_bus *bus, const char *name, int flags) {
                 l = strlen(name);
                 n = alloca0(offsetof(struct kdbus_cmd_name, name) + l + 1);
                 n->size = offsetof(struct kdbus_cmd_name, name) + l + 1;
-                n->name_flags = flags;
+                n->flags = flags;
                 memcpy(n->name, name, l+1);
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
@@ -86,7 +86,7 @@ int sd_bus_request_name(sd_bus *bus, const char *name, int flags) {
                 if (r < 0)
                         return -errno;
 
-                return n->name_flags;
+                return n->flags;
         } else {
                 r = sd_bus_call_method(
                                 bus,
@@ -142,7 +142,7 @@ int sd_bus_release_name(sd_bus *bus, const char *name) {
                 if (r < 0)
                         return -errno;
 
-                return n->name_flags;
+                return n->flags;
         } else {
                 r = sd_bus_call_method(
                                 bus,
@@ -406,8 +406,10 @@ int bus_add_match_internal(
                                 break;
 
                         case BUS_MATCH_PATH_NAMESPACE:
-                                bloom_add_pair(bloom, "path-slash-prefix", c->value_str);
-                                using_bloom = true;
+                                if (!streq(c->value_str, "/")) {
+                                        bloom_add_pair(bloom, "path-slash-prefix", c->value_str);
+                                        using_bloom = true;
+                                }
                                 break;
 
                         case BUS_MATCH_ARG...BUS_MATCH_ARG_LAST: {