[systemd-commits] src/libsystemd

Daniel Mack zonque at kemper.freedesktop.org
Mon Dec 22 11:01:07 PST 2014


 src/libsystemd/sd-bus/bus-kernel.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 856d6e09887730f115e43faf9577b479f2beb3c4
Author: Daniel Mack <daniel at zonque.org>
Date:   Mon Dec 22 19:59:53 2014 +0100

    sd-bus: ignore KDBUS_ITEM_TIMESTAMP in kernel messages
    
    Kernel notifications carry a timestamp now, so make sure
    bus_kernel_translate_message() doesn't complain when it stumbles across
    them.

diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index cdca48d..a696289 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1267,6 +1267,9 @@ static int bus_kernel_translate_message(sd_bus *bus, struct kdbus_msg *k) {
         assert(k->payload_type == KDBUS_PAYLOAD_KERNEL);
 
         KDBUS_ITEM_FOREACH(d, k, items) {
+                if (d->type == KDBUS_ITEM_TIMESTAMP)
+                        continue;
+
                 if (d->type >= _KDBUS_ITEM_KERNEL_BASE && d->type < _KDBUS_ITEM_KERNEL_BASE + ELEMENTSOF(translate)) {
                         if (found)
                                 return -EBADMSG;



More information about the systemd-commits mailing list