Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix problem with handling CHLD=0 command
@ 2010-10-19 12:32 Lukasz Pawlik
  2010-10-19 13:44 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Pawlik @ 2010-10-19 12:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lukasz Pawlik

This patch change handling of CHLD=0 command. Previously both calls
(held and waiting) were terminated when HS sent CHLD=0. Now all held
calls will be released or only incoming call will be rejected without
affecting any held calls.
---
 audio/telephony-maemo6.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index f4dfbde..33fd13f 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -784,8 +784,11 @@ void telephony_call_hold_req(void *telephony_device, const char *cmd)
 
 	switch (cmd[0]) {
 	case '0':
-		foreach_call_with_status(CSD_CALL_STATUS_HOLD, release_call);
-		foreach_call_with_status(CSD_CALL_STATUS_WAITING,
+		if (find_call_with_status(CSD_CALL_STATUS_WAITING))
+			foreach_call_with_status(CSD_CALL_STATUS_WAITING,
+								release_call);
+		else
+			foreach_call_with_status(CSD_CALL_STATUS_HOLD,
 								release_call);
 		break;
 	case '1':
-- 
1.7.0.4


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 12:32 [PATCH] Fix problem with handling CHLD=0 command Lukasz Pawlik
2010-10-19 13:44 ` Johan Hedberg

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