From 426bb5ddb8ff122d3e08b0480466718b68485e70 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 8 Jan 2015 20:58:59 +0100 Subject: [PATCH] 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. --- src/bus-proxyd/bus-proxyd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index 549120b23..44e16fcd1 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); -- 2.30.2