[MERGED] osmo-ttcn3-hacks[master]: bsc: f_establish_fully(): Wait for release of old channel

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jan 29 21:36:41 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: bsc: f_establish_fully(): Wait for release of old channel
......................................................................


bsc: f_establish_fully(): Wait for release of old channel

We shouldn't "pass" f_establish_fully() in the assignment case
as long as the old RF channel hasn't been released via RSL.

Change-Id: If7c7c8c4826feba47f8a0395c291157a0e48cd9d
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 11 insertions(+), 5 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 80bc1fb..6afeca2 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -375,19 +375,21 @@
 	boolean is_assignment,
 	/* Assignment related bits */
 	boolean rr_ass_cmpl_seen,
+	boolean assignment_done,
 	RslChannelNr old_chan_nr,
 	/* Modify related bits */
 	boolean rr_modify_seen,
-	boolean rsl_modify_seen
+	boolean modify_done
 }
 
 template (value) AssignmentState ts_AssignmentStateInit := {
 	voice_call := false,
 	is_assignment := false,
 	rr_ass_cmpl_seen := false,
+	assignment_done := false,
 	old_chan_nr := -,
 	rr_modify_seen := false,
-	rsl_modify_seen := false
+	modify_done := false
 }
 
 altstep as_assignment(inout AssignmentState st) runs on MSC_ConnHdlr {
@@ -426,6 +428,7 @@
 		RSL.send(ts_RSL_RF_CHAN_REL_ACK(st.old_chan_nr));
 		/* FIXME: unregister for old channel number in RSL emulation */
 		//f_rslem_unregister(0, st.old_chan_nr);
+		st.assignment_done := true;
 		repeat;
 		}
 }
@@ -446,7 +449,7 @@
 		}
 	[st.voice_call and st.rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl {
 		RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr));
-		st.rsl_modify_seen := true;
+		st.modify_done := true;
 		repeat;
 		}
 }
@@ -524,10 +527,13 @@
 	[st.voice_call] as_Media();
 
 	/* if we receive exactly what we expected, always return + pass */
-	[] BSSAP.receive(exp_ass_cpl) -> value bssap {
+	[st.is_assignment and st.assignment_done or
+	 (not st.is_assignment and st.modify_done)] BSSAP.receive(exp_ass_cpl) -> value bssap {
 		setverdict(pass);
 		}
-	[exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) {
+	[(st.is_assignment and st.assignment_done or
+	 (not st.is_assignment and st.modify_done)) and
+	 exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) {
 		setverdict(fail, "Received non-matching ASSIGNMENT COMPLETE");
 		}
 	[exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) {

-- 
To view, visit https://gerrit.osmocom.org/6187
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If7c7c8c4826feba47f8a0395c291157a0e48cd9d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list