diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-01-08 20:58:59 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-01-08 20:58:59 +0100 |
commit | 426bb5ddb8ff122d3e08b0480466718b68485e70 (patch) | |
tree | 64b82e0e1c6640da63d89e43c35e89be96b75902 /src/bus-proxyd/bus-proxyd.c | |
parent | 9dc41cc5974a4af291de0c67b53050cceee5f6a4 (diff) |
bus-proxyd: optimize replies if they're not requested
If a caller does not request a reply, dont send it. This skips message
creation and speeds up NO_REPLY_EXPECTED cases. Note that sd-bus still
handles this case internally, but if we handle it in bus-proxyd, we can
skip the whole message creation step.
Diffstat (limited to 'src/bus-proxyd/bus-proxyd.c')
-rw-r--r-- | src/bus-proxyd/bus-proxyd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index 549120b23d..44e16fcd15 100644 --- a/src/bus-proxyd/bus-proxyd.c +++ b/src/bus-proxyd/bus-proxyd.c @@ -405,6 +405,9 @@ static int synthetic_reply_return_strv(sd_bus_message *call, char **l) { assert(call); + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) + return 0; + r = sd_bus_message_new_method_return(call, &m); if (r < 0) return synthetic_reply_method_errno(call, r, NULL); |