chiark / gitweb /
nspawn: introduce the new /machine/ tree in the cgroup tree and move containers there
[elogind.git] / src / libsystemd-bus / bus-match.c
index fed25c1a2aeda0576e0a52818cf0a66ac0833746..501a38df70b8aad2905d687fffc5bf070e348624 100644 (file)
@@ -146,7 +146,7 @@ static bool value_node_test(
         case BUS_MATCH_MEMBER:
         case BUS_MATCH_PATH:
         case BUS_MATCH_ARG ... BUS_MATCH_ARG_LAST:
-                return streq(node->value.str, value_str);
+                return streq_ptr(node->value.str, value_str);
 
         case BUS_MATCH_ARG_NAMESPACE ... BUS_MATCH_ARG_NAMESPACE_LAST:
                 return namespace_simple_pattern(node->value.str, value_str);
@@ -251,6 +251,10 @@ int bus_match_run(
                         node->leaf.last_iteration = bus->iteration_counter;
                 }
 
+                r = sd_bus_message_rewind(m, true);
+                if (r < 0)
+                        return r;
+
                 /* Run the callback. And then invoke siblings. */
                 assert(node->leaf.callback);
                 r = node->leaf.callback(bus, ret, m, node->leaf.userdata);
@@ -725,7 +729,7 @@ static int parse_match(
                                 }
                         }
 
-                        if (!greedy_realloc((void**) &value, &value_allocated, j + 2)) {
+                        if (!GREEDY_REALLOC(value, value_allocated, j + 2)) {
                                 r = -ENOMEM;
                                 goto fail;
                         }
@@ -744,8 +748,7 @@ static int parse_match(
                 } else
                         u = 0;
 
-                if (!greedy_realloc((void**) &components, &components_allocated,
-                                    (n_components + 1) * sizeof(struct match_component))) {
+                if (!GREEDY_REALLOC(components, components_allocated, n_components + 1)) {
                         r = -ENOMEM;
                         goto fail;
                 }