diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2012-01-13 10:15:46 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2012-01-13 10:15:46 +0800 |
commit | f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c (patch) | |
tree | 853db8953050709923c4053641f09840f0545e60 /src/empathy-call-handler.c | |
parent | ab7a79c4f87cee1ae9811da921c2a03abacec7b5 (diff) | |
download | gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.tar gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.tar.gz gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.tar.bz2 gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.tar.lz gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.tar.xz gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.tar.zst gsoc2013-empathy-f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c.zip |
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.
Diffstat (limited to 'src/empathy-call-handler.c')
-rw-r--r-- | src/empathy-call-handler.c | 19 |
1 files changed, 15 insertions, 4 deletions
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; } |