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


Change subject: hnodeb: Fix passing pars to f_start_handler()
......................................................................

hnodeb: Fix passing pars to f_start_handler()

isvalue() returns false when the template is not omit, which is
unexpected in this code path. Let's explicitly test against "omit" here.

Change-Id: I05bb47dc12b4544a6f2d4fc1fadc9e68da374f8b
---
M hnodeb/HNB_Tests.ttcn
1 file changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/hnodeb/HNB_Tests.ttcn b/hnodeb/HNB_Tests.ttcn
index a58e203..24feab8 100644
--- a/hnodeb/HNB_Tests.ttcn
+++ b/hnodeb/HNB_Tests.ttcn
@@ -174,10 +174,10 @@
 function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars_tmpl 
:= omit)
 runs on test_CT return HNBGW_ConnHdlr {
        var TestHdlrParams pars;
-       if (isvalue(pars)) {
-               pars := valueof(pars_tmpl);
-       } else {
+       if (istemplatekind(pars_tmpl, "omit")) {
                pars := valueof(f_gen_test_hdlr_pars());
+       } else {
+               pars := valueof(pars_tmpl);
        }
        return f_start_handler_run(f_start_handler_create(pars), fn, pars);
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28255
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: I05bb47dc12b4544a6f2d4fc1fadc9e68da374f8b
Gerrit-Change-Number: 28255
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to