diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-09-29 17:57:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-09-29 17:57:34 +0200 |
commit | 532f808fd15ec2cd91777ab3ad9afce2670ebac5 (patch) | |
tree | 18b27f0cd75a6648728c17e7809ba238f0710851 /src | |
parent | e28d0865539e07fcabe14270c700d21ef16ffdce (diff) | |
download | systemd-532f808fd15ec2cd91777ab3ad9afce2670ebac5.tar.gz |
sd-bus: drop match cookie concept
THe match cookie was used by kdbus to identify matches we install
uniquely. But given that kdbus is gone, the cookie serves no process
anymore, let's kill it.
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-bus/bus-control.c | 6 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-control.h | 7 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-internal.h | 3 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-slot.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/sd-bus.c | 3 |
5 files changed, 6 insertions, 15 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index 1a87d3a0ee..3c770a6e2e 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -650,8 +650,7 @@ int bus_add_match_internal( sd_bus *bus, const char *match, struct bus_match_component *components, - unsigned n_components, - uint64_t cookie) { + unsigned n_components) { assert(bus); @@ -686,8 +685,7 @@ static int bus_remove_match_internal_dbus1( int bus_remove_match_internal( sd_bus *bus, - const char *match, - uint64_t cookie) { + const char *match) { assert(bus); diff --git a/src/libsystemd/sd-bus/bus-control.h b/src/libsystemd/sd-bus/bus-control.h index 91efc68d57..01c71874db 100644 --- a/src/libsystemd/sd-bus/bus-control.h +++ b/src/libsystemd/sd-bus/bus-control.h @@ -23,8 +23,5 @@ #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); diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index 9a3bc9dd98..5afd9f0936 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -53,7 +53,6 @@ struct filter_callback { struct match_callback { sd_bus_message_handler_t callback; - uint64_t cookie; unsigned last_iteration; char *match_string; @@ -287,8 +286,6 @@ struct sd_bus { 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; diff --git a/src/libsystemd/sd-bus/bus-slot.c b/src/libsystemd/sd-bus/bus-slot.c index 33590c31ac..725265b331 100644 --- a/src/libsystemd/sd-bus/bus-slot.c +++ b/src/libsystemd/sd-bus/bus-slot.c @@ -93,7 +93,7 @@ void bus_slot_disconnect(sd_bus_slot *slot) { 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); diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 5ce1cdeb0f..621fabb015 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -2858,7 +2858,6 @@ _public_ int sd_bus_add_match( } s->match_callback.callback = callback; - s->match_callback.cookie = ++bus->match_cookie; if (bus->bus_client) { enum bus_match_scope scope; @@ -2878,7 +2877,7 @@ _public_ int sd_bus_add_match( 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; |