Change in osmo-ttcn3-hacks[master]: msc: eliminate bssap_idx

neels gerrit-no-reply at lists.osmocom.org
Wed Jul 28 16:22:40 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25088 )


Change subject: msc: eliminate bssap_idx
......................................................................

msc: eliminate bssap_idx

There is a pars.ran_idx, no need for an explicit bssap_idx argument.

There is only one occurence passing a nonzero bssap_idx, use
pars.ran_idx instead.

Preparation for patch "msc: split f_start_handler_with_pars()"
Ic7e9dbb8c9db5948fe35fc3051bb988d65622782

Related: SYS#5130
Change-Id: Ib5c5585f098ff269920cf9d5781c4366234854c5
---
M msc/MSC_Tests.ttcn
1 file changed, 11 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/25088/1

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 0e0d6b6..740d396 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -412,14 +412,15 @@
 	return pars;
 }
 
-function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars, integer bssap_idx := 0) runs on MTC_CT return BSC_ConnHdlr {
+function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MTC_CT return BSC_ConnHdlr {
 	var BSC_ConnHdlr vc_conn;
-	var charstring id := testcasename() & int2str(bssap_idx);
+	var charstring id := testcasename() & int2str(pars.ran_idx);
 
 	vc_conn := BSC_ConnHdlr.create(id);
+
 	/* BSSMAP part / A interface */
-	connect(vc_conn:BSSAP, g_bssap[pars.ran_idx + bssap_idx].vc_RAN:CLIENT);
-	connect(vc_conn:BSSAP_PROC, g_bssap[pars.ran_idx + bssap_idx].vc_RAN:PROC);
+	connect(vc_conn:BSSAP, g_bssap[pars.ran_idx].vc_RAN:CLIENT);
+	connect(vc_conn:BSSAP_PROC, g_bssap[pars.ran_idx].vc_RAN:PROC);
 	/* MNCC part */
 	connect(vc_conn:MNCC, vc_MNCC:MNCC_CLIENT);
 	connect(vc_conn:MNCC_PROC, vc_MNCC:MNCC_PROC);
@@ -5912,6 +5913,7 @@
 	pars0.use_umts_aka := true;
 	pars0.vec := f_gen_auth_vec_3g();
 	pars0.vec_keep := true;
+	pars0.ran_idx := 0;
 
 	var BSC_ConnHdlrPars pars1 := f_init_pars(53);
 	pars1.use_ipv6 := use_ipv6;
@@ -5926,14 +5928,15 @@
 	 * components and then not overwriting it in BSC_ConnectionHandler. */
 	pars1.vec := pars0.vec;
 	pars1.vec_keep := true;
+	pars1.ran_idx := 1;
 
 	if (a5_n > 0) {
 		f_vty_config(MSCVTY, "network", "authentication required");
 	}
 	f_vty_config(MSCVTY, "network", "encryption a5 " & int2str(a5_n));
 
-	vc_conn0 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc0), pars0, 0);
-	vc_conn1 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc1), pars1, 1);
+	vc_conn0 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc0), pars0);
+	vc_conn1 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc1), pars1);
 	vc_conn0.done;
 	vc_conn1.done;
 }
@@ -6252,7 +6255,7 @@
 	}
 	f_vty_config(MSCVTY, "network", "encryption a5 " & int2str(a5_n));
 
-	vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars, 0);
+	vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars);
 	vc_conn.done;
 }
 testcase TC_ho_inter_msc_out() runs on MTC_CT {
@@ -6274,7 +6277,7 @@
 	var BSC_ConnHdlrPars pars := f_init_pars(54);
 	pars.use_ipv6 := true;
 
-	vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars, 0);
+	vc_conn := f_start_handler_with_pars(refers(f_tc_ho_inter_msc_out), pars);
 	vc_conn.done;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25088
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib5c5585f098ff269920cf9d5781c4366234854c5
Gerrit-Change-Number: 25088
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210728/04e332c8/attachment.htm>


More information about the gerrit-log mailing list