diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index db96d608c..dd31dafc4 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -304,29 +304,7 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr testcase.stop("excess number of BSC instances requested"); } - for (var integer i := 0; i < num_bsc; i := i + 1) { - if (isbound(mp_bssap_cfg[i])) { - var RanOps ranops := BSC_RanOps; - ranops.use_osmux := osmux; - f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), ranops); - f_ran_adapter_start(g_bssap[i]); - } else { - testcase.stop("missing BSSAP configuration"); - } - } - f_ipa_ctrl_start_client(mp_msc_ip, mp_msc_ctrl_port); - f_init_mncc("MSC_Test"); - f_init_mgcp("MSC_Test"); - - if (gsup == true) { - f_init_gsup("MSC_Test"); - } - f_init_smpp("MSC_Test"); - - if (sgsap == true) { - f_init_sgsap("MSC_Test"); - } map(self:MSCVTY, system:MSCVTY); f_vty_set_prompts(MSCVTY); @@ -344,6 +322,30 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr } else { f_vty_config(MSCVTY, "msc", "osmux off"); } + + for (var integer i := 0; i < num_bsc; i := i + 1) { + if (isbound(mp_bssap_cfg[i])) { + var RanOps ranops := BSC_RanOps; + ranops.use_osmux := osmux; + f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), ranops); + f_ran_adapter_start(g_bssap[i]); + } else { + testcase.stop("missing BSSAP configuration"); + } + } + + f_init_mncc("MSC_Test"); + f_init_mgcp("MSC_Test"); + + if (gsup == true) { + f_init_gsup("MSC_Test"); + } + f_init_smpp("MSC_Test"); + + if (sgsap == true) { + f_init_sgsap("MSC_Test"); + } + } /* Initialize for a direct connection to BSSAP. This function is an alternative