summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-13 16:43:22 +0100
committerHarald Welte <laforge@osmocom.org>2021-02-13 16:49:25 +0100
commit3bd182f3b37cd4d14bb7809a888c0cab159acce2 (patch)
treeaf2a4aa70fe9bdd101a4639c99e70c052a181fc1
parente5d41540d95f85426eebac7a23f1d3ca739907b0 (diff)
NS_Emulation: Factor-out function to broadcast to all NS_VCs
-rw-r--r--library/NS_Emulation.ttcnpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 6d8113c3..24c9941d 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -461,6 +461,12 @@ module NS_Emulation {
}
}
+ private function f_broadcast_ns_ctrl(template (value) NsCtrlRequest req) runs on NS_CT {
+ for (var integer i := 0; i < lengthof(g_nsvcs); i := i+1) {
+ NSVC.send(req) to g_nsvcs[i].vc_conn;
+ }
+ }
+
/* simple IP Sub-Network Service responder for the SGSN side. This is not a full implementation
* of the protocol, merely sufficient to make the PCU/BSS side happy to proceed */
private altstep as_vcg_sns_sgsn() runs on NS_CT {
@@ -489,9 +495,7 @@ module NS_Emulation {
/* success */
log("SNS Config succeeded. Sending Alive");
/* inform all NS-VC that they are now considered alive */
- for (var integer i := 0; i < lengthof(g_nsvcs); i := i+1) {
- NSVC.send(NsCtrlRequest:StartAliveProcedure) to g_nsvcs[i].vc_conn;
- }
+ f_broadcast_ns_ctrl(NsCtrlRequest:StartAliveProcedure);
}
[] NSVC.receive(SnsIndication:{sind.nsvci,
tr_SNS_CONFIG_ACK(g_config.nsei, ?)}) from vc {