man: Add a paragraph to sd_bus_call explaning callback message lifetime

This commit is contained in:
igo95862 2020-11-17 12:47:28 +03:00 committed by Zbigniew Jędrzejewski-Szmek
parent 8dc299a0da
commit e6ce785d61
1 changed files with 6 additions and 0 deletions

View File

@ -89,6 +89,12 @@
input parameter; it can be used to propagate errors from the callback handler, it will not receive any
error that was received as method reply.)</para>
<para>The message <parameter>m</parameter> passed to the callback is only borrowed, that is, the callback should
not call <citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
on it. If the callback wants to hold on to the message beyond the lifetime of the callback, it needs to call
<citerefentry><refentrytitle>sd_bus_message_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> to create a
new reference.</para>
<para>If <parameter>usec</parameter> is zero, the default D-Bus method call timeout is used. See
<citerefentry><refentrytitle>sd_bus_get_method_call_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>