summaryrefslogtreecommitdiffstats
path: root/drivers/hfpmodem
diff options
context:
space:
mode:
authorZhenhua Zhang <zhenhua.zhang@intel.com>2009-11-16 22:12:43 +0800
committerDenis Kenzior <denkenz@gmail.com>2009-11-16 10:17:05 -0600
commit2cbb307013d1a9104f0090c32157bf4d9487e183 (patch)
tree7d86f043de42be7b991afd620bc4efb436cd2f0b /drivers/hfpmodem
parentea29ea9bd5bee840b3bedf55ddc963f177d90d64 (diff)
downloadofono-2cbb307013d1a9104f0090c32157bf4d9487e183.tar.bz2
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.
Diffstat (limited to 'drivers/hfpmodem')
-rw-r--r--drivers/hfpmodem/voicecall.c6
1 files changed, 6 insertions, 0 deletions
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:"))