aboutsummaryrefslogtreecommitdiffstats
path: root/src
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 16:53:16 +0800
commit5085eb78ac957826779a699b19761eeb484002c9 (patch)
tree556a25f3a96381550f60c0185e18947c9cb8ae78 /src
parentcfc22fd4c69dd22590f592cd5486e5b517b39e9d (diff)
downloadgsoc2013-empathy-5085eb78ac957826779a699b19761eeb484002c9.tar.gz
gsoc2013-empathy-5085eb78ac957826779a699b19761eeb484002c9.tar.zst
gsoc2013-empathy-5085eb78ac957826779a699b19761eeb484002c9.zip
empathy-call: Clean up the TfChannel before resetting the pipeline
Fixes: https://bugzilla.gnome.org/686311
Diffstat (limited to 'src')
-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