empathy r2183 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2183 - trunk/libempathy
- Date: Fri, 9 Jan 2009 16:15:10 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 9 16:15:10 2009
New Revision: 2183
URL: http://svn.gnome.org/viewvc/empathy?rev=2183&view=rev
Log:
Don't close channels as a side-effect of disposing wrapper objects
Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>
Modified:
trunk/libempathy/empathy-tp-call.c
trunk/libempathy/empathy-tp-chat.c
trunk/libempathy/empathy-tp-file.c
Modified: trunk/libempathy/empathy-tp-call.c
==============================================================================
--- trunk/libempathy/empathy-tp-call.c (original)
+++ trunk/libempathy/empathy-tp-call.c Fri Jan 9 16:15:10 2009
@@ -478,7 +478,7 @@
return object;
}
-static void
+static void
tp_call_finalize (GObject *object)
{
EmpathyTpCallPriv *priv = GET_PRIV (object);
@@ -489,9 +489,18 @@
g_slice_free (EmpathyTpCallStream, priv->video);
g_object_unref (priv->group);
+ if (priv->group != NULL)
+ g_object_unref (priv->group);
+
+ priv->group = NULL;
+
if (priv->channel != NULL)
{
- empathy_tp_call_close (EMPATHY_TP_CALL (object));
+ g_signal_handlers_disconnect_by_func (priv->channel,
+ tp_call_channel_invalidated_cb, object);
+
+ g_object_unref (priv->channel);
+ priv->channel = NULL;
}
if (priv->stream_engine != NULL)
Modified: trunk/libempathy/empathy-tp-chat.c
==============================================================================
--- trunk/libempathy/empathy-tp-chat.c (original)
+++ trunk/libempathy/empathy-tp-chat.c Fri Jan 9 16:15:10 2009
@@ -896,7 +896,12 @@
priv->dispose_has_run = TRUE;
if (priv->channel != NULL)
- empathy_tp_chat_close (self);
+ {
+ g_signal_handlers_disconnect_by_func (priv->channel,
+ tp_chat_invalidated_cb, self);
+ g_object_unref (priv->channel);
+ priv->channel = NULL;
+ }
if (priv->remote_contact != NULL)
g_object_unref (priv->remote_contact);
Modified: trunk/libempathy/empathy-tp-file.c
==============================================================================
--- trunk/libempathy/empathy-tp-file.c (original)
+++ trunk/libempathy/empathy-tp-file.c Fri Jan 9 16:15:10 2009
@@ -352,12 +352,10 @@
if (tp_file->priv->channel)
{
- DEBUG ("Closing channel..");
g_signal_handlers_disconnect_by_func (tp_file->priv->channel,
tp_file_invalidated_cb, object);
- tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL,
- NULL, NULL);
g_object_unref (tp_file->priv->channel);
+ tp_file->priv->channel = NULL;
}
if (tp_file->priv->factory)
@@ -913,6 +911,7 @@
{
g_return_if_fail (EMPATHY_IS_TP_FILE (tp_file));
+ DEBUG ("Closing channel..");
tp_cli_channel_call_close (tp_file->priv->channel, -1,
NULL, NULL, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]