summaryrefslogtreecommitdiff
path: root/man/sd_bus_call.xml
diff options
context:
space:
mode:
authorigo95862 <igo95862@yandex.ru>2020-11-17 12:47:28 +0300
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-11-17 11:13:10 +0100
commite6ce785d611702532ae71547e78fbb49eff3aded (patch)
tree6fea555b88a0c4cfcd961464fe1c49d2ebfecac5 /man/sd_bus_call.xml
parent8dc299a0daa8cabc763f7dba9bbf6852816614a8 (diff)
downloadsystemd-e6ce785d611702532ae71547e78fbb49eff3aded.tar.gz
man: Add a paragraph to sd_bus_call explaning callback message lifetime
Diffstat (limited to 'man/sd_bus_call.xml')
-rw-r--r--man/sd_bus_call.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/man/sd_bus_call.xml b/man/sd_bus_call.xml
index fa0089bd22..1f7dfc2e82 100644
--- a/man/sd_bus_call.xml
+++ b/man/sd_bus_call.xml
@@ -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>