summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-05-10 22:26:55 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-10 22:26:55 +0200
commit7a14fd5c43cf5dfc0d20f8f476c94694b5718e8a (patch)
tree17c696e6fc7abb6e379ee115c1094d5bf998b982
parent8a9bf6f21518925c2c1a62ffa7935fe80401cbfe (diff)
bsc: f_establish_fully(): Support non-assignment cases
If it's a pure signalling procedure (like LU), the MSC will never even send a BSSMAP ASSIGNMENT CMD. Our test suite should be able to produce this kind of behavior by passing "omit" as assignment comamnd to the f_establish_fully() function. Change-Id: I9bb5c8c19518905cf1ce121aa0b433886ec594d5
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn38
1 files changed, 19 insertions, 19 deletions
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index fe524dc..991a693 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -675,8 +675,25 @@ return boolean {
}
/* establish a channel fully, expecting an assignment matching 'exp' */
-function f_establish_fully_ret(PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl)
-runs on MSC_ConnHdlr return PDU_BSSAP {
+function f_establish_fully(template (omit) PDU_BSSAP ass_tpl, template PDU_BSSAP exp_ass_cpl)
+runs on MSC_ConnHdlr {
+ f_MscConnHdlr_init(1, "127.0.0.2", "127.0.0.3");
+
+ f_create_chan_and_exp();
+ /* we should now have a COMPL_L3 at the MSC */
+ BSSAP.receive(tr_BSSMAP_ComplL3);
+
+ /* start ciphering, if requested */
+ if (ispresent(g_pars.encr)) {
+ f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
+ }
+
+ /* bail out early if no assignment requested */
+ if (istemplatekind(ass_tpl, "omit")) {
+ return;
+ }
+
+ var PDU_BSSAP ass_cmd := valueof(ass_tpl);
var PDU_BSSAP bssap;
timer T := 10.0;
var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete);
@@ -696,17 +713,6 @@ runs on MSC_ConnHdlr return PDU_BSSAP {
st.is_assignment := true;
}
- f_MscConnHdlr_init(1, "127.0.0.2", "127.0.0.3");
-
- f_create_chan_and_exp();
- /* we should now have a COMPL_L3 at the MSC */
- BSSAP.receive(tr_BSSMAP_ComplL3);
-
- /* start ciphering, if requested */
- if (ispresent(g_pars.encr)) {
- f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
- }
-
f_create_mgcp_expect(mgcpcrit);
BSSAP.send(ass_cmd);
@@ -751,12 +757,6 @@ runs on MSC_ConnHdlr return PDU_BSSAP {
if (not isbound(bssap)) {
self.stop;
}
- return bssap;
-}
-
-function f_establish_fully(PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl)
-runs on MSC_ConnHdlr {
- var PDU_BSSAP unused := f_establish_fully_ret(ass_cmd, exp_ass_cpl);
}
type record HandoverState {