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.
This commit is contained in:
Daniel Mack
2014-12-22 19:59:53 +01:00
parent e24e415e5f
commit 856d6e0988
+3
View File
@@ -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;