Re: Check whether a dbus caller is still alive

Simon McVittie <smcv-ZGY8ohtN/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
On Mon, 02 Oct 2017 at 08:55:36 +0100, David Llewellyn-Jones wrote:
> The following will turn my invocation into its unique sender name:
> 
> const gchar * unique_name;
> unique_name = g_dbus_message_get_sender
>     (g_dbus_method_invocation_get_message (invocation));
> 
> Now waiting on a "NameOwnerChanged" signal with old_owner matching
> unique_name and new_owner matching "" indicates that the owner of that
> message is no longer interested.

This is the correct approach, please continue to use it.

    smcv
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.