[Telepathy-commits] [telepathy-gabble/master] Fix dbus_server_unref when a D-Bus tube is disposed.
Alban Crequy
alban.crequy at collabora.co.uk
Fri Oct 17 14:50:14 PDT 2008
According to the documentation of dbus_server_listen:
* To free the server, applications must call first
dbus_server_disconnect() and then dbus_server_unref().
libdbus enforce this by asserting if Gabble does not disconnect before
unreffing.
---
src/tube-dbus.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index e95c803..efd1aa1 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -428,7 +428,11 @@ gabble_tube_dbus_dispose (GObject *object)
}
if (priv->dbus_srv)
- dbus_server_unref (priv->dbus_srv);
+ {
+ dbus_server_disconnect (priv->dbus_srv);
+ dbus_server_unref (priv->dbus_srv);
+ priv->dbus_srv = NULL;
+ }
if (priv->socket_path != NULL)
{
--
1.5.6.5
More information about the Telepathy-commits
mailing list