Re: DBusServer accepted client close

Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Organization Geek Central
Message-ID <[email protected]>
On Thu, 4 Oct 2018 17:10:06 +0800, Andy Green wrote:

> When I create the connection using eg gdbus, stuff
> that I allocate that I want to associate with the connection, has no
> obvious event on which it can be deallocated because the connection
> has ended.

How about setting a DBusNewConnectionFunction on your DBusServer object
<https://dbus.freedesktop.org/doc/api/html/group__DBusServer.html#gaa14d9109e04adccffd9a40460c28c53b>
which calls dbus_connection_set_data to set some dummy data together
with a DBusFreeFunction
<https://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#ga845b4942399f43dd4ac644de7cb9e3ff>.
Then when the free function is called (without you doing a
dbus_connection_set_data again on the same slot), then you know the
connection is going away.
_______________________________________________
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.