sd_bus *bus,
const char *match,
struct bus_match_component *components,
- unsigned n_components,
- uint64_t cookie) {
+ unsigned n_components) {
assert(bus);
int bus_remove_match_internal(
sd_bus *bus,
- const char *match,
- uint64_t cookie) {
+ const char *match) {
assert(bus);
#include "bus-match.h"
-int bus_add_match_internal(sd_bus *bus, const char *match, struct bus_match_component *components, unsigned n_components, uint64_t cookie);
-int bus_remove_match_internal(sd_bus *bus, const char *match, uint64_t cookie);
-
-int bus_add_match_internal_kernel(sd_bus *bus, struct bus_match_component *components, unsigned n_components, uint64_t cookie);
-int bus_remove_match_internal_kernel(sd_bus *bus, uint64_t cookie);
+int bus_add_match_internal(sd_bus *bus, const char *match, struct bus_match_component *components, unsigned n_components);
+int bus_remove_match_internal(sd_bus *bus, const char *match);
struct match_callback {
sd_bus_message_handler_t callback;
- uint64_t cookie;
unsigned last_iteration;
char *match_string;
uint64_t hello_flags;
uint64_t attach_flags;
- uint64_t match_cookie;
-
sd_event_source *input_io_event_source;
sd_event_source *output_io_event_source;
sd_event_source *time_event_source;
case BUS_MATCH_CALLBACK:
if (slot->match_added)
- bus_remove_match_internal(slot->bus, slot->match_callback.match_string, slot->match_callback.cookie);
+ bus_remove_match_internal(slot->bus, slot->match_callback.match_string);
slot->bus->match_callbacks_modified = true;
bus_match_remove(&slot->bus->match_callbacks, &slot->match_callback);
}
s->match_callback.callback = callback;
- s->match_callback.cookie = ++bus->match_cookie;
if (bus->bus_client) {
enum bus_match_scope scope;
goto finish;
}
- r = bus_add_match_internal(bus, s->match_callback.match_string, components, n_components, s->match_callback.cookie);
+ r = bus_add_match_internal(bus, s->match_callback.match_string, components, n_components);
if (r < 0)
goto finish;