diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-14 17:46:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-14 17:46:41 +0200 |
commit | 88fe224c8c3cf80ad48bb2b5ddd6e455b0a112d4 (patch) | |
tree | 2bbc99b26a8548db5f8e73c2b09267bb5674b377 /src/libsystemd-bus/bus-match.c | |
parent | 42c5aaf3ba3eb9e11a1a2cad105e0dd956ac9763 (diff) |
bus: always explicitly rewind read index before passing message to caller or callback
Diffstat (limited to 'src/libsystemd-bus/bus-match.c')
-rw-r--r-- | src/libsystemd-bus/bus-match.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-match.c b/src/libsystemd-bus/bus-match.c index 01434b33b5..501a38df70 100644 --- a/src/libsystemd-bus/bus-match.c +++ b/src/libsystemd-bus/bus-match.c @@ -251,6 +251,10 @@ int bus_match_run( node->leaf.last_iteration = bus->iteration_counter; } + r = sd_bus_message_rewind(m, true); + if (r < 0) + return r; + /* Run the callback. And then invoke siblings. */ assert(node->leaf.callback); r = node->leaf.callback(bus, ret, m, node->leaf.userdata); |