[empathy] empathy-call: Clean up the TfChannel before resetting the pipeline
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy-call: Clean up the TfChannel before resetting the pipeline
- Date: Thu, 18 Oct 2012 09:05:54 +0000 (UTC)
commit 5085eb78ac957826779a699b19761eeb484002c9
Author: Debarshi Ray <debarshir src gnome org>
Date: Thu Oct 18 10:42:36 2012 +0200
empathy-call: Clean up the TfChannel before resetting the pipeline
Fixes: https://bugzilla.gnome.org/686311
src/empathy-call-handler.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c
index 3b870be..63c4f48 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]