if (!node)
return 0;
+ if (bus && bus->match_callbacks_modified)
+ return 0;
+
/* Not these special semantics: when traversing the tree we
* usually let bus_match_run() when called for a node
* recursively invoke bus_match_run(). There's are two
case BUS_MATCH_LEAF:
+ if (bus) {
+ if (node->leaf.last_iteration == bus->iteration_counter)
+ return 0;
+
+ node->leaf.last_iteration = bus->iteration_counter;
+ }
+
/* Run the callback. And then invoke siblings. */
assert(node->leaf.callback);
r = node->leaf.callback(bus, ret, m, node->leaf.userdata);
}
}
+ if (bus && bus->match_callbacks_modified)
+ return 0;
+
/* And now, let's invoke our siblings */
return bus_match_run(bus, node->next, ret, m);
}