Linux bluetooth development
 help / color / mirror / Atom feed
From: Dmitriy Paliy <dmitriy.paliy@nokia.com>
To: linux-bluetooth@vger.kernel.org
Cc: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Subject: [PATCH BlueZ v2] Fix call status in +CLCC for maemo6 telephony
Date: Tue, 11 Oct 2011 14:34:58 +0300	[thread overview]
Message-ID: <1318332898-21272-2-git-send-email-dmitriy.paliy@nokia.com> (raw)
In-Reply-To: <1318332898-21272-1-git-send-email-dmitriy.paliy@nokia.com>

If list current calls is requested when there is second incoming call
and csd call status is CSD_CALL_STATUS_PROCEEDING, then returned 'state
of the call' value in +CLCC is 4 (incoming, MT call), which is incorrect.
Indication than proceeds from incoming to waiting state.

This patch sets the corresponding value to 5 (waiting, MT call) in
maemo6 telephony driver for the second call.
---
 audio/telephony-maemo6.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 102daeb..82cb274 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -932,8 +932,16 @@ static int csd_status_to_hfp(struct csd_call *call)
 		/* PROCEEDING can happen in outgoing/incoming */
 		if (call->originating)
 			return CALL_STATUS_DIALING;
-		else
-			return CALL_STATUS_INCOMING;
+
+		/*
+		 * PROCEEDING is followed by WAITING CSD status, therefore
+		 * second incoming call status indication is set immediately
+		 * to waiting.
+		 */
+		if (g_slist_length(active_calls) > 0)
+			return CALL_STATUS_WAITING;
+
+		return CALL_STATUS_INCOMING;
 	case CSD_CALL_STATUS_COMING:
 		return CALL_STATUS_INCOMING;
 	case CSD_CALL_STATUS_MO_ALERTING:
-- 
1.7.4.1


  reply	other threads:[~2011-10-11 11:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 11:34 [PATCH BlueZ v2 0/1] Fix call status in +CLCC for maemo6 telephony Dmitriy Paliy
2011-10-11 11:34 ` Dmitriy Paliy [this message]
2011-10-11 12:12   ` [PATCH BlueZ v2] " Luiz Augusto von Dentz
2011-10-12  7:54   ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1318332898-21272-2-git-send-email-dmitriy.paliy@nokia.com \
    --to=dmitriy.paliy@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox