<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21467">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gbproxy: Make sure all BssgpCfg have a valid create_cb<br><br>We cannot specify create_cb function references from the config file,<br>so let's patch them into the data structure at start-up.<br><br>Change-Id: Idac9e97dde62b61d0423fdde16e3bd700d5287c0<br>---<br>M gbproxy/GBProxy_Tests.ttcn<br>1 file changed, 12 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/67/21467/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn</span><br><span>index 5bb77d3..30a019e 100644</span><br><span>--- a/gbproxy/GBProxy_Tests.ttcn</span><br><span>+++ b/gbproxy/GBProxy_Tests.ttcn</span><br><span>@@ -289,6 +289,15 @@</span><br><span>         return ret;</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+private function f_fix_create_cb(inout BssgpConfig cfg)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ for (var integer i := 0; i < lengthof(cfg.bvc); i := i + 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+              if (not isbound(cfg.bvc[i].create_cb)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      cfg.bvc[i].create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> private function f_init_gb_pcu(inout GbInstance gb, charstring id, integer offset) runs on test_CT {</span><br><span>       var charstring ns_id := id & "-NS(PCU[" & int2str(offset) & "])";</span><br><span>    var charstring bssgp_id := id & "-BSSGP(PCU[" & int2str(offset) & "])";</span><br><span>@@ -364,8 +373,10 @@</span><br><span>       }</span><br><span>    for (i := 0; i < lengthof(mp_gbconfigs); i := i+1) {</span><br><span>              g_pcu[i].cfg := mp_gbconfigs[i];</span><br><span style="color: hsl(120, 100%, 40%);">+              /* make sure all have a proper crate_cb, which cannot be specified in config file */</span><br><span style="color: hsl(120, 100%, 40%);">+          f_fix_create_cb(g_pcu[i].cfg);</span><br><span>               /* concatenate all the PCU-side BVCs for the SGSN side */</span><br><span style="color: hsl(0, 100%, 40%);">-               g_sgsn[0].cfg.bvc := g_sgsn[0].cfg.bvc & mp_gbconfigs[i].bvc;</span><br><span style="color: hsl(120, 100%, 40%);">+             g_sgsn[0].cfg.bvc := g_sgsn[0].cfg.bvc & g_pcu[i].cfg.bvc;</span><br><span>       }</span><br><span> </span><br><span>        f_init_vty();</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21467">change 21467</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21467"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Idac9e97dde62b61d0423fdde16e3bd700d5287c0 </div>
<div style="display:none"> Gerrit-Change-Number: 21467 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>