Skip to content

Draft: codegen: Optimize server-side GDBus reply handling

  • Don't send a reply if NO_REPLY_EXPECTED is set. This is already taken care of by g_dbus_method_invocation_return_gerror(), so we only need to do this for the non-error case, since we generate the reply message and manually send it.
  • Because we have to keep arguments alive for the duration of the call, and this requires us to pass a ready callback even in case of NO_REPLY_EXPECTED, there is a challenge: If the implementation is a GDBus proxy, the presence of a ready callback means we don't set NO_REPLY_EXPECTED, even if we don't want the reply. But since we know that a proxy will copy the arguments right away, we can omit the ready callback in that case.
Edited by Rico Tzschichholz

Merge request reports