summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-09 00:01:36 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-09 00:01:36 +0100
commit96ceff428359b8f757d9d4da1f5da13bb9b5ab2e (patch)
treebff6e13e3c84ccdab33b2f20cb77d27f9848f91c /src/libsystemd/sd-bus
parente7100587da6d147fa601c911122d13ad4257e963 (diff)
sd-bus: catch up with current kdbus, don't do matches on kdbus monitor connections
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/bus-control.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 6a9e9b296a..261cf0d044 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -1180,6 +1180,10 @@ int bus_add_match_internal_kernel(
assert(bus);
+ /* Monitor streams don't support matches, make this a NOP */
+ if (bus->hello_flags & KDBUS_HELLO_MONITOR)
+ return 0;
+
bloom = alloca0(bus->bloom_size);
sz = ALIGN8(offsetof(struct kdbus_cmd_match, items));
@@ -1392,6 +1396,10 @@ int bus_remove_match_internal_kernel(
assert(bus);
+ /* Monitor streams don't support matches, make this a NOP */
+ if (bus->hello_flags & KDBUS_HELLO_MONITOR)
+ return 0;
+
zero(m);
m.size = offsetof(struct kdbus_cmd_match, items);
m.cookie = cookie;