bsc: move as_Media arg fail_on_dlcx to pars
Prepare to use fail_on_dlcx in a new test case. Instead of dragging the
parameter through lots of function calls, just add it to pars.
Related: OS#5787
Change-Id: I6f0c4ce543724cc6f18bae9fc2b480f5818db8b7
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index ed9c13b..aa54225 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -442,7 +442,7 @@
/* altstep for handling of MGCP media related commands. Activated by as_Media() to test
* MGW level media handling */
-altstep as_Media_mgw(boolean norepeat := false, boolean fail_on_dlcx := true) runs on MSC_ConnHdlr {
+altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr {
var MgcpCommand mgcp_cmd;
var template MgcpResponse mgcp_resp;
var MGCP_RecvFrom mrf;
@@ -496,20 +496,20 @@
}
}
- [fail_on_dlcx and g_pars.aoip] MGCP.receive(tr_DLCX) {
+ [g_pars.fail_on_dlcx and g_pars.aoip] MGCP.receive(tr_DLCX) {
setverdict(fail, "Unexpected DLCX received");
}
- [fail_on_dlcx and not g_pars.aoip] MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) {
+ [g_pars.fail_on_dlcx and not g_pars.aoip] MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) {
setverdict(fail, "Unexpected DLCX received");
}
}
/* Altsteps for handling of media related commands. Can be activated by a given
* test case if it expects to see media related handling (i.e. voice calls) */
-altstep as_Media(boolean fail_on_dlcx := true) runs on MSC_ConnHdlr {
+altstep as_Media() runs on MSC_ConnHdlr {
[] as_Media_ipacc();
- [] as_Media_mgw(fail_on_dlcx := fail_on_dlcx);
+ [] as_Media_mgw();
}
type port Coord_PT message
@@ -759,7 +759,8 @@
boolean expect_ho_fail,
boolean expect_ho_fail_lchan_est,
boolean inter_bsc_ho_in__ho_req_in_initial_sccp_cr,
- boolean ignore_mgw_mdcx
+ boolean ignore_mgw_mdcx,
+ boolean fail_on_dlcx
};
/* Note: Do not use valueof() to get a value of this template, use
@@ -806,7 +807,8 @@
expect_ho_fail := false,
expect_ho_fail_lchan_est := false,
inter_bsc_ho_in__ho_req_in_initial_sccp_cr := true,
- ignore_mgw_mdcx := false
+ ignore_mgw_mdcx := false,
+ fail_on_dlcx := true
}
function f_create_chan_and_exp(template (present) PDU_BSSAP exp_l3_compl := ?)