From 2cbb307013d1a9104f0090c32157bf4d9487e183 Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang Date: Mon, 16 Nov 2009 22:12:43 +0800 Subject: Fix: Ignore repeated CCWA notify if have 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 file changed, 6 insertions(+) (limited to 'drivers') diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index f0445520..85cd94e3 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -465,6 +465,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:")) -- cgit v1.2.3