Change in osmo-ttcn3-hacks[master]: msc: split f_start_handler_with_pars()

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/+/25089 )


Change subject: msc: split f_start_handler_with_pars()
......................................................................

msc: split f_start_handler_with_pars()

To allow running connect() on the COORD ports of test components before
starting the test component but after creating it, split
f_start_handler_with_pars() into f_start_handler_create() and _run().

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

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



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

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 84ba6dd..3b3336b 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -412,7 +412,7 @@
 	return pars;
 }
 
-function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MTC_CT return BSC_ConnHdlr {
+function f_start_handler_create(BSC_ConnHdlrPars pars) runs on MTC_CT return BSC_ConnHdlr {
 	var BSC_ConnHdlr vc_conn;
 	var charstring id := testcasename() & int2str(pars.ran_idx);
 
@@ -440,10 +440,20 @@
 		connect(vc_conn:SGsAP, vc_SGsAP:SGsAP_CLIENT);
 		connect(vc_conn:SGsAP_PROC, vc_SGsAP:SGsAP_PROC);
 	}
+	return vc_conn;
+}
 
+function f_start_handler_run(BSC_ConnHdlr vc_conn, void_fn fn, BSC_ConnHdlrPars pars) runs on MTC_CT {
+	var charstring id := testcasename() & int2str(pars.ran_idx);
 	/* We cannot use vc_conn.start(f_init_handler(fn, id, pars)); as we cannot have
 	 * a stand-alone 'derefers()' call, see https://www.eclipse.org/forums/index.php/t/1091364/ */
 	vc_conn.start(derefers(fn)(id, pars));
+}
+
+function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MTC_CT return BSC_ConnHdlr {
+	var BSC_ConnHdlr vc_conn;
+	vc_conn := f_start_handler_create(pars);
+	f_start_handler_run(vc_conn, fn, pars);
 	return vc_conn;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25089
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: Ic7e9dbb8c9db5948fe35fc3051bb988d65622782
Gerrit-Change-Number: 25089
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/e82307a6/attachment.htm>


More information about the gerrit-log mailing list