summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/atmodem/voicecall.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index c7b9ac7f..22a802fa 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -727,6 +727,11 @@ static void ring_notify(GAtResult *result, gpointer user_data)
dump_response("ring_notify", TRUE, result);
+ /* See comment in CRING */
+ if (g_slist_find_custom(vd->calls, GINT_TO_POINTER(5),
+ call_compare_by_status))
+ return;
+
/* RING can repeat, ignore if we already have an incoming call */
if (g_slist_find_custom(vd->calls, GINT_TO_POINTER(4),
call_compare_by_status))
@@ -755,6 +760,17 @@ static void cring_notify(GAtResult *result, gpointer user_data)
dump_response("cring_notify", TRUE, result);
+ /* Handle the following situation:
+ * Active Call + Waiting Call. Active Call is Released. The Waiting
+ * call becomes Incoming and RING/CRING indications are signaled.
+ * Sometimes these arrive before we managed to poll CLCC to find about
+ * the stage change. If this happens, simply ignore the RING/CRING
+ * when a waiting call exists (cannot have waiting + incoming in GSM)
+ */
+ if (g_slist_find_custom(vd->calls, GINT_TO_POINTER(5),
+ call_compare_by_status))
+ return;
+
/* CRING can repeat, ignore if we already have an incoming call */
if (g_slist_find_custom(vd->calls, GINT_TO_POINTER(4),
call_compare_by_status))