aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-chat.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-10-01 19:59:31 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-10-01 19:59:31 +0800
commitca185d17f0ed45663616b86e4c3b5beaa8b8ff57 (patch)
treed9fcfb9da29112233fc3195b007b4fe032f9158b /libempathy/empathy-tp-chat.c
parenta04f8ff608edfd05b7dafb789eca0e96b7ee9b63 (diff)
downloadgsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.tar
gsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.tar.gz
gsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.tar.bz2
gsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.tar.lz
gsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.tar.xz
gsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.tar.zst
gsoc2013-empathy-ca185d17f0ed45663616b86e4c3b5beaa8b8ff57.zip
Disconnect all signals in finalize. Fixes bug #462815.
2007-10-01 Xavier Claessens <xclaesse@gmail.com> * libempathy/empathy-tp-chat.c: Disconnect all signals in finalize. Fixes bug #462815. svn path=/trunk/; revision=347
Diffstat (limited to 'libempathy/empathy-tp-chat.c')
-rw-r--r--libempathy/empathy-tp-chat.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index fc943f0c6..feba273bd 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -346,10 +346,31 @@ tp_chat_finalize (GObject *object)
chat = EMPATHY_TP_CHAT (object);
priv = GET_PRIV (chat);
+ if (priv->text_iface) {
+ dbus_g_proxy_disconnect_signal (priv->text_iface, "Received",
+ G_CALLBACK (tp_chat_received_cb),
+ chat);
+ dbus_g_proxy_disconnect_signal (priv->text_iface, "Sent",
+ G_CALLBACK (tp_chat_sent_cb),
+ chat);
+ dbus_g_proxy_disconnect_signal (priv->text_iface, "SendError",
+ G_CALLBACK (tp_chat_send_error_cb),
+ chat);
+ }
+
+ if (priv->chat_state_iface) {
+ dbus_g_proxy_disconnect_signal (priv->chat_state_iface, "ChatStateChanged",
+ G_CALLBACK (tp_chat_state_changed_cb),
+ chat);
+ }
+
if (priv->tp_chan) {
g_signal_handlers_disconnect_by_func (priv->tp_chan,
tp_chat_destroy_cb,
object);
+ dbus_g_proxy_disconnect_signal (DBUS_G_PROXY (priv->tp_chan), "Closed",
+ G_CALLBACK (tp_chat_closed_cb),
+ chat);
if (priv->acknowledge) {
empathy_debug (DEBUG_DOMAIN, "Closing channel...");
if (!tp_chan_close (DBUS_G_PROXY (priv->tp_chan), &error)) {