Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix problem with hanging up held call
@ 2010-10-13  8:37 Lukasz Pawlik
  2010-10-13  9:33 ` Lukasz Pawlik
  0 siblings, 1 reply; 3+ messages in thread
From: Lukasz Pawlik @ 2010-10-13  8:37 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lukasz Pawlik

According to the HFP specification AT+CHUP command should not have impact
on the state of any held calls. Previously held call was terminated when
there was second alerting call. This patch fix this problem. AT+CHUP
command will go towards alerting call.
---
 audio/telephony-maemo6.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 05ff332..00a4b25 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -498,6 +498,7 @@ void telephony_last_dialed_number_req(void *telephony_device)
 void telephony_terminate_call_req(void *telephony_device)
 {
 	struct csd_call *call;
+	struct csd_call *alerting;
 	int err;
 
 	call = find_call_with_status(CSD_CALL_STATUS_ACTIVE);
@@ -511,6 +512,9 @@ void telephony_terminate_call_req(void *telephony_device)
 		return;
 	}
 
+	alerting = find_call_with_status(CSD_CALL_STATUS_MO_ALERTING);
+	if (call->on_hold && alerting)
+		err = release_call(alerting);
 	if (call->conference)
 		err = release_conference();
 	else
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix problem with hanging up held call
  2010-10-13  8:37 [PATCH] Fix problem with hanging up held call Lukasz Pawlik
@ 2010-10-13  9:33 ` Lukasz Pawlik
  2010-10-13 12:03   ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: Lukasz Pawlik @ 2010-10-13  9:33 UTC (permalink / raw)
  To: johan.hedberg; +Cc: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]

There was an error in my patch. Patch attached to this mail fix it.

2010/10/13 Lukasz Pawlik <lucas.pawlik@gmail.com>:
> According to the HFP specification AT+CHUP command should not have impact
> on the state of any held calls. Previously held call was terminated when
> there was second alerting call. This patch fix this problem. AT+CHUP
> command will go towards alerting call.
> ---
>  audio/telephony-maemo6.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
> index 05ff332..00a4b25 100644
> --- a/audio/telephony-maemo6.c
> +++ b/audio/telephony-maemo6.c
> @@ -498,6 +498,7 @@ void telephony_last_dialed_number_req(void *telephony_device)
>  void telephony_terminate_call_req(void *telephony_device)
>  {
>        struct csd_call *call;
> +       struct csd_call *alerting;
>        int err;
>
>        call = find_call_with_status(CSD_CALL_STATUS_ACTIVE);
> @@ -511,6 +512,9 @@ void telephony_terminate_call_req(void *telephony_device)
>                return;
>        }
>
> +       alerting = find_call_with_status(CSD_CALL_STATUS_MO_ALERTING);
> +       if (call->on_hold && alerting)
> +               err = release_call(alerting);
>        if (call->conference)
>                err = release_conference();
>        else
> --
> 1.7.0.4
>
>

[-- Attachment #2: 0001-Fix-problem-with-hanging-up-held-call.patch --]
[-- Type: text/x-patch, Size: 1344 bytes --]

From 7b7c4adf982a0c98df14331bf357619d1b483227 Mon Sep 17 00:00:00 2001
From: Lukasz Pawlik <lucas.pawlik@gmail.com>
Date: Wed, 13 Oct 2010 10:54:21 +0200
Subject: [PATCH] Fix problem with hanging up held call

According to the HFP specification AT+CHUP command should not have impact
on the state of any held calls. Previously held call was terminated when
there was second alerting call. This patch fix this problem. AT+CHUP
command will go towards alerting call.
---
 audio/telephony-maemo6.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 05ff332..1aac034 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -498,6 +498,7 @@ void telephony_last_dialed_number_req(void *telephony_device)
 void telephony_terminate_call_req(void *telephony_device)
 {
 	struct csd_call *call;
+	struct csd_call *alerting;
 	int err;
 
 	call = find_call_with_status(CSD_CALL_STATUS_ACTIVE);
@@ -511,7 +512,10 @@ void telephony_terminate_call_req(void *telephony_device)
 		return;
 	}
 
-	if (call->conference)
+	alerting = find_call_with_status(CSD_CALL_STATUS_MO_ALERTING);
+	if (call->on_hold && alerting)
+		err = release_call(alerting);
+	else if (call->conference)
 		err = release_conference();
 	else
 		err = release_call(call);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix problem with hanging up held call
  2010-10-13  9:33 ` Lukasz Pawlik
@ 2010-10-13 12:03   ` Johan Hedberg
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2010-10-13 12:03 UTC (permalink / raw)
  To: Lukasz Pawlik; +Cc: linux-bluetooth

Hi Lukasz,

On Wed, Oct 13, 2010, Lukasz Pawlik wrote:
> There was an error in my patch. Patch attached to this mail fix it.

Thanks. The (updated) patch has been pushed upstream.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-13 12:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13  8:37 [PATCH] Fix problem with hanging up held call Lukasz Pawlik
2010-10-13  9:33 ` Lukasz Pawlik
2010-10-13 12:03   ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox