summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-12-25 16:42:50 +0100
committerKay Sievers <kay@vrfy.org>2013-12-25 16:42:50 +0100
commit80a33f113bbdadf4fc7ffec7fed026fde59d232b (patch)
treef6e4522a72b72e4effd94be547fa90836749da80 /src/libsystemd-bus/bus-kernel.c
parent7e94edc2a43b9fdb3d9fc743ab1994c3d4a13d9f (diff)
bus: conditionally set cookie_reply/timeout and update kdbus.h
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd-bus/bus-kernel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index c15218fe98..7944f51383 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -257,8 +257,11 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) {
m->destination ? unique : KDBUS_DST_ID_BROADCAST;
m->kdbus->payload_type = KDBUS_PAYLOAD_DBUS;
m->kdbus->cookie = m->header->serial;
- m->kdbus->cookie_reply = m->reply_serial;
- m->kdbus->timeout_ns = m->timeout * NSEC_PER_USEC;
+
+ if (m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
+ m->kdbus->cookie_reply = m->reply_serial;
+ else
+ m->kdbus->timeout_ns = m->timeout * NSEC_PER_USEC;
d = m->kdbus->items;