empathy r2230 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2230 - trunk/libempathy
- Date: Thu, 15 Jan 2009 10:28:03 +0000 (UTC)
Author: xclaesse
Date: Thu Jan 15 10:28:03 2009
New Revision: 2230
URL: http://svn.gnome.org/viewvc/empathy?rev=2230&view=rev
Log:
Do not unref the channel when closing it, wait for the invalidated signal.
Modified:
trunk/libempathy/empathy-tp-call.c
Modified: trunk/libempathy/empathy-tp-call.c
==============================================================================
--- trunk/libempathy/empathy-tp-call.c (original)
+++ trunk/libempathy/empathy-tp-call.c Thu Jan 15 10:28:03 2009
@@ -370,23 +370,6 @@
}
static void
-tp_call_close_channel (EmpathyTpCall *call)
-{
- EmpathyTpCallPriv *priv = GET_PRIV (call);
-
- if (priv->status == EMPATHY_TP_CALL_STATUS_CLOSED)
- return;
-
- DEBUG ("Closing channel");
-
- tp_cli_channel_call_close (priv->channel, -1,
- NULL, NULL, NULL, NULL);
-
- priv->status = EMPATHY_TP_CALL_STATUS_CLOSED;
- g_object_notify (G_OBJECT (call), "status");
-}
-
-static void
tp_call_stream_engine_invalidated_cb (TpProxy *stream_engine,
GQuark domain,
gint code,
@@ -394,7 +377,7 @@
EmpathyTpCall *call)
{
DEBUG ("Stream engine proxy invalidated: %s", message);
- tp_call_close_channel (call);
+ empathy_tp_call_close (call);
}
static void
@@ -414,7 +397,7 @@
if (priv->stream_engine_running && G_STR_EMPTY (new_owner))
{
DEBUG ("Stream engine falled off the bus");
- tp_call_close_channel (call);
+ empathy_tp_call_close (call);
return;
}
@@ -695,13 +678,18 @@
{
EmpathyTpCallPriv *priv = GET_PRIV (call);
- g_signal_handlers_disconnect_by_func (priv->channel,
- tp_call_channel_invalidated_cb, call);
+ g_return_if_fail (EMPATHY_IS_TP_CALL (call));
- tp_call_close_channel (call);
+ if (priv->status == EMPATHY_TP_CALL_STATUS_CLOSED)
+ return;
- g_object_unref (priv->channel);
- priv->channel = NULL;
+ DEBUG ("Closing channel");
+
+ tp_cli_channel_call_close (priv->channel, -1,
+ NULL, NULL, NULL, NULL);
+
+ priv->status = EMPATHY_TP_CALL_STATUS_CLOSED;
+ g_object_notify (G_OBJECT (call), "status");
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]