aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@src.gnome.org>2012-10-18 16:42:36 +0800
committerDebarshi Ray <debarshir@src.gnome.org>2012-10-18 17:10:18 +0800
commit9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf (patch)
treec47a58c94626ad994aaec7565f87becaac19b762
parentced43d0b8450eceda0ac1fbc84ac176c075d87f3 (diff)
downloadgsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.tar
gsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.tar.gz
gsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.tar.bz2
gsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.tar.lz
gsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.tar.xz
gsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.tar.zst
gsoc2013-empathy-9a7ebcfed29a8bdb46c5d9a2032b14cc67e7ffdf.zip
empathy-call: Clean up the TfChannel before resetting the pipeline
Fixes: https://bugzilla.gnome.org/686311
-rw-r--r--src/empathy-call-handler.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c
index 3b870be07..63c4f48a3 100644
--- a/src/empathy-call-handler.c
+++ b/src/empathy-call-handler.c
@@ -177,6 +177,20 @@ on_call_state_changed_cb (TpCallChannel *call,
{
EmpathyCallHandlerPriv *priv = handler->priv;
+ /* Clean up the TfChannel before bubbling the state-change signal
+ * further up. This ensures that the conference-removed signal is
+ * emitted before state-changed so that the client gets a chance
+ * to remove the conference from the pipeline before resetting the
+ * pipeline itself.
+ */
+ if (state == TP_CALL_STATE_ENDED)
+ {
+ tp_channel_close_async (TP_CHANNEL (call), NULL, NULL);
+ priv->accept_when_initialised = FALSE;
+ tp_clear_object (&priv->call);
+ tp_clear_object (&priv->tfchannel);
+ }
+
g_signal_emit (handler, signals[STATE_CHANGED], 0, state,
reason->dbus_reason);
@@ -186,14 +200,6 @@ on_call_state_changed_cb (TpCallChannel *call,
tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL);
priv->accept_when_initialised = FALSE;
}
-
- if (state == TP_CALL_STATE_ENDED)
- {
- tp_channel_close_async (TP_CHANNEL (call), NULL, NULL);
- priv->accept_when_initialised = FALSE;
- tp_clear_object (&priv->call);
- tp_clear_object (&priv->tfchannel);
- }
}
static void