[empathy/call1] call-handler: check the state before deferring the accept()
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/call1] call-handler: check the state before deferring the accept()
- Date: Thu, 12 Jan 2012 09:21:59 +0000 (UTC)
commit ab7a79c4f87cee1ae9811da921c2a03abacec7b5
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Thu Jan 12 16:59:45 2012 +1100
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.
src/empathy-call-handler.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c
index 614b470..703ed32 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]