aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2012-01-12 13:59:45 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2012-01-12 13:59:45 +0800
commitab7a79c4f87cee1ae9811da921c2a03abacec7b5 (patch)
tree43e6e472d0a2b67750906ecb755259ba4ae4a57e
parent03a2ddbde7bd15e6601f3b3e6bd2b5cc269df498 (diff)
downloadgsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.tar
gsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.tar.gz
gsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.tar.bz2
gsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.tar.lz
gsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.tar.xz
gsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.tar.zst
gsoc2013-empathy-ab7a79c4f87cee1ae9811da921c2a03abacec7b5.zip
call-handler: check the state before deferring the accept()
Xavier's previous patch delayed calling accept() until the channel was in the INITIALISED state, however, if the channel is already in the INITIALISED state by the time we receive it, we should just accept immediately. Otherwise we'll spend our lives waiting for a state transition that will never occur.
-rw-r--r--src/empathy-call-handler.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c
index 614b470c6..703ed3299 100644
--- a/src/empathy-call-handler.c
+++ b/src/empathy-call-handler.c
@@ -910,7 +910,13 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler,
if (priv->call != NULL)
{
empathy_call_handler_start_tpfs (handler);
- priv->accept_when_initialised = TRUE;
+
+ if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) ==
+ TP_CALL_STATE_INITIALISED)
+ tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL);
+ else
+ priv->accept_when_initialised = TRUE;
+
return;
}