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
This commit is contained in:
parent
8a9bf6f215
commit
7a14fd5c43
|
@ -675,8 +675,25 @@ return boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* establish a channel fully, expecting an assignment matching 'exp' */
|
/* establish a channel fully, expecting an assignment matching 'exp' */
|
||||||
function f_establish_fully_ret(PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl)
|
function f_establish_fully(template (omit) PDU_BSSAP ass_tpl, template PDU_BSSAP exp_ass_cpl)
|
||||||
runs on MSC_ConnHdlr return PDU_BSSAP {
|
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;
|
var PDU_BSSAP bssap;
|
||||||
timer T := 10.0;
|
timer T := 10.0;
|
||||||
var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete);
|
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;
|
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);
|
f_create_mgcp_expect(mgcpcrit);
|
||||||
BSSAP.send(ass_cmd);
|
BSSAP.send(ass_cmd);
|
||||||
|
|
||||||
|
@ -751,12 +757,6 @@ runs on MSC_ConnHdlr return PDU_BSSAP {
|
||||||
if (not isbound(bssap)) {
|
if (not isbound(bssap)) {
|
||||||
self.stop;
|
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 {
|
type record HandoverState {
|
||||||
|
|
Loading…
Reference in New Issue