summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-19 20:16:27 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-20 23:00:09 +0100
commit5407f2dea3efa5234140f1adb9c2be9916d77cdc (patch)
tree7b4f63d82bd5849a8b95c25a1e1ce83a7c9a9755 /src/libsystemd-bus/sd-bus.c
parentde1c301ed165eb4d04a0c9d4babe97912b5233bb (diff)
bus: suppress reply messages to method calls with no_reply set
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r--src/libsystemd-bus/sd-bus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index d80f09793c..f7d7644463 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -996,6 +996,11 @@ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) {
if (r < 0)
return r;
+ /* If this is a reply and no reply was requested, then let's
+ * suppress this, if we can */
+ if (m->dont_send && !serial)
+ return 0;
+
if (bus->wqueue_size <= 0) {
size_t idx = 0;