From f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Fri, 13 Jan 2012 13:15:46 +1100 Subject: call-handler: also accept outgoing calls immediately Outgoing calls are in PENDING_INITIATOR until you accept them, So Empathy would never actually start dialing an outgoing call until you redialled and it got picked up by the other codepath, which accepts immediately. --- src/empathy-call-handler.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/empathy-call-handler.c') diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c index 703ed3299..3389c8374 100644 --- a/src/empathy-call-handler.c +++ b/src/empathy-call-handler.c @@ -911,11 +911,22 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler, { empathy_call_handler_start_tpfs (handler); - 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); + if (tp_channel_get_requested (TP_CHANNEL (priv->call))) + { + /* accept outgoing channels immediately */ + tp_call_channel_accept_async (priv->call, + on_call_accepted_cb, NULL); + } else - priv->accept_when_initialised = TRUE; + { + /* accepting incoming channels when they are INITIALISED */ + 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; } -- cgit v1.2.3