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
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) {