All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] Fix: Ignore repeated CCWA notify if have
@ 2009-11-16 14:12 Zhenhua Zhang
  2009-11-16 16:17 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenhua Zhang @ 2009-11-16 14:12 UTC (permalink / raw)
  To: ofono

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

Some phone like iPhone repeats CCWA notify. So we need to ignore
it when we already have waiting call.
---
 drivers/hfpmodem/voicecall.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 53d4fd1..689597d 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -450,6 +450,12 @@ static void ccwa_notify(GAtResult *result, gpointer
user_data)
 
 	dump_response("ccwa_notify", TRUE, result);
 
+	/* CCWA can repeat, ignore if we already have an waiting call */
+	if (g_slist_find_custom(vd->calls,
+				GINT_TO_POINTER(CALL_STATUS_WAITING),
+				at_util_call_compare_by_status))
+		return;
+
 	g_at_result_iter_init(&iter, result);
 
 	if (!g_at_result_iter_next(&iter, "+CCWA:"))
-- 
1.6.2.5




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

end of thread, other threads:[~2009-11-16 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16 14:12 [PATCH 4/4] Fix: Ignore repeated CCWA notify if have Zhenhua Zhang
2009-11-16 16:17 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.