From 55184c4cfc6beb3e5e689194fb8331e3b9a4ab36 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Sep 2024 14:13:22 +0200 Subject: [PATCH] man: document that sd_bus_process() only returns otherwise unhandled messages in *ret_message --- man/sd_bus_process.xml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/man/sd_bus_process.xml b/man/sd_bus_process.xml index d9b49bd79e..46e221c9f9 100644 --- a/man/sd_bus_process.xml +++ b/man/sd_bus_process.xml @@ -52,12 +52,24 @@ sd_bus_get_fd3. - sd_bus_process() processes at most one incoming message per call. If the parameter - ret is not NULL and the call processed a message, - *ret is set to this message. The caller owns a reference to this message and should call - sd_bus_message_unref3 when the - message is no longer needed. If ret is not NULL, progress was made, but no message was - processed, *ret is set to NULL. + sd_bus_process() processes at most one incoming message per call. If the + parameter ret is not NULL and the call processed a message, + *ret is set to this message. The caller owns a reference to this message and + should call + sd_bus_message_unref3 + when the message is no longer needed. If ret is not NULL and + progress was made, but no message was processed, *ret is set to + NULL. Note that only messages not already handled by the various types of registered + message handlers (i.e. by filters registered via + sd_bus_add_filter3, + object handlers registered via + sd_bus_add_object3, + matches registered via + sd_bus_add_match3, + and related) will be returned through this parameter. Also note that if such a message handler returns a + zero return value (as opposed to some value > 0) an incoming message will not be considered handled, + and be passed to other suitable handlers (until one returns > > 0), or returned by + sd_bus_process() (in case none returns > 0). If the bus object is connected to an sd-event3 event loop (with