All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] emulator: Fix start of RING event
@ 2012-02-09 14:12 =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
  2012-02-15 11:27 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis @ 2012-02-09 14:12 UTC (permalink / raw)
  To: ofono

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

RING event should only be sent when callsetup indicator is set to
Incoming and there is no active call.

If call indicator is set to inactive while callsetup is
already set to Incoming (waiting call has generated +CCWA),
no RING event should be sent.

Ref.: PTS test TC_AG_TWC_BV_02_I
---
 src/emulator.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index 262e782..0fa6eac 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -1219,23 +1219,12 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
 	}
 
 	/*
-	 * Ring timer should be started when:
-	 * - callsetup indicator is set to Incoming and there is no active call
-	 *   (not a waiting call)
-	 * - or call indicator is set to inactive while callsetup is already
-	 *   set to Incoming.
+	 * Ring timer should be started when callsetup indicator is set to
+	 * Incoming and there is no active call (not a waiting call).
 	 * In those cases, a first RING should be sent just after the +CIEV
 	 * Ring timer should be stopped for all other values of callsetup
 	 */
-	if (waiting)
-		return;
-
-	/* Call state went from active/held + waiting -> incoming */
-	if (call && value == OFONO_EMULATOR_CALL_INACTIVE &&
-			cs_ind->value == OFONO_EMULATOR_CALLSETUP_INCOMING)
-		goto start_ring;
-
-	if (!callsetup)
+	if (!callsetup || waiting)
 		return;
 
 	if (value != OFONO_EMULATOR_CALLSETUP_INCOMING) {
@@ -1247,7 +1236,6 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
 		return;
 	}
 
-start_ring:
 	notify_ring(em);
 	em->callsetup_source = g_timeout_add_seconds(RING_TIMEOUT,
 							notify_ring, em);
-- 
1.7.1


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

end of thread, other threads:[~2012-02-15 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 14:12 [PATCH] emulator: Fix start of RING event =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2012-02-15 11:27 ` 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.