This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21467 )
Change subject: gbproxy: Make sure all BssgpCfg have a valid create_cb
......................................................................
gbproxy: Make sure all BssgpCfg have a valid create_cb
We cannot specify create_cb function references from the config file,
so let's patch them into the data structure at start-up.
Change-Id: Idac9e97dde62b61d0423fdde16e3bd700d5287c0
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 12 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 5bb77d3..30a019e 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -289,6 +289,15 @@
return ret;
};
+private function f_fix_create_cb(inout BssgpConfig cfg)
+{
+ for (var integer i := 0; i < lengthof(cfg.bvc); i := i + 1) {
+ if (not isbound(cfg.bvc[i].create_cb)) {
+ cfg.bvc[i].create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
+ }
+ }
+}
+
private function f_init_gb_pcu(inout GbInstance gb, charstring id, integer offset) runs on test_CT {
var charstring ns_id := id & "-NS(PCU[" & int2str(offset) & "])";
var charstring bssgp_id := id & "-BSSGP(PCU[" & int2str(offset) & "])";
@@ -364,8 +373,10 @@
}
for (i := 0; i < lengthof(mp_gbconfigs); i := i+1) {
g_pcu[i].cfg := mp_gbconfigs[i];
+ /* make sure all have a proper crate_cb, which cannot be specified in config file */
+ f_fix_create_cb(g_pcu[i].cfg);
/* concatenate all the PCU-side BVCs for the SGSN side */
- g_sgsn[0].cfg.bvc := g_sgsn[0].cfg.bvc & mp_gbconfigs[i].bvc;
+ g_sgsn[0].cfg.bvc := g_sgsn[0].cfg.bvc & g_pcu[i].cfg.bvc;
}
f_init_vty();
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21467
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: Idac9e97dde62b61d0423fdde16e3bd700d5287c0
Gerrit-Change-Number: 21467
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201202/c0b27b45/attachment.htm>