diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 15d83da81..1c02cb642 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -837,7 +837,15 @@ private type record of boolean my_BooleanList; private function f_vty_msc_allow_attach(TELNETasp_PT pt, my_BooleanList allow_attach_list) { + var charstring config := f_vty_transceive_ret(pt, "show running-config"); + for (var integer msc_nr := 0; msc_nr < sizeof(allow_attach_list); msc_nr := msc_nr+1) { + if (f_strstr(config, "\nmsc " & int2str(msc_nr) & "\n") < 0) { + /* There is no 'msc N' for this msc_nr in the running config, so don't create an empty msc by + * stepping into that config node. */ + log("msc ", msc_nr, " is not configured, skipping"); + continue; + } f_vty_enter_cfg_msc(pt, msc_nr); if (allow_attach_list[msc_nr]) { /* strict := false: ignore if osmo-bsc does not support this config option (latest build) */