[systemd-devel] Returning a struct from an sd-bus method

Simon McVittie smcv at collabora.com
Thu Aug 23 17:01:53 UTC 2018


On Thu, 23 Aug 2018 at 17:34:14 +0100, Simon McVittie wrote:
> Finally, I think the message-building API expects struct members as
> individual arguments, like
> 
>     sd_bus_reply_method_return(m, "xx", (int64_t) s->x, (int64_t) s->y);

Sorry, obviously that's correct when not using a struct. What I meant is
that I think this:

    sd_bus_reply_method_return(m, "(xx)", (int64_t) s->x, (int64_t) s->y);

might be the correct way to return a message containing a single struct.

    smcv


More information about the systemd-devel mailing list