From: Adrian Szyndela Date: Tue, 24 Mar 2020 07:25:50 +0000 (+0100) Subject: sd-bus: kdbus: set read_counter in synthesized msgs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a29671f460bf024fc2ecc78e689f1eb934db7a2a;p=platform%2Fupstream%2Fsystemd.git sd-bus: kdbus: set read_counter in synthesized msgs read_counter was not set for synthesized messages, this was failing a match check at bus-match.c:297. --- diff --git a/src/libsystemd/sd-bus/bus-control-kernel.c b/src/libsystemd/sd-bus/bus-control-kernel.c index 34fe3d5..09d9638 100644 --- a/src/libsystemd/sd-bus/bus-control-kernel.c +++ b/src/libsystemd/sd-bus/bus-control-kernel.c @@ -198,6 +198,7 @@ static int enqueue_kernel_reply( } } + m->read_counter = ++bus->read_counter; bus->rqueue[bus->rqueue_size++] = bus_message_ref_queued(m, bus); if (ret_slot) diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 0c58044..fdffe99 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -855,6 +855,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) { m->free_fds = true; fds = NULL; + m->read_counter = ++bus->read_counter; bus->rqueue[bus->rqueue_size++] = bus_message_ref_queued(m, bus); sd_bus_message_unref(m); @@ -1167,6 +1168,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call if (r < 0) return r; + m->read_counter = ++bus->read_counter; r = bus_seal_synthetic_message(bus, reply); if (r < 0) return r; @@ -1228,6 +1230,7 @@ static int push_name_owner_changed( bus_message_set_sender_driver(bus, m); message_set_timestamp(bus, m, ts); + m->read_counter = ++bus->read_counter; r = bus_seal_synthetic_message(bus, m); if (r < 0) return r; @@ -1312,6 +1315,7 @@ static int translate_reply( message_set_timestamp(bus, m, ts); + m->read_counter = ++bus->read_counter; r = bus_seal_synthetic_message(bus, m); if (r < 0) return r;