mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 18:27:04 +03:00
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.
This commit is contained in:
parent
9dc41cc597
commit
426bb5ddb8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user