[S] Change in osmo-ttcn3-hacks[master]: fix hnbgw: RAN_Emu: ranap_unitdata_cb: call only when present
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33406 ) Change subject: fix hnbgw: RAN_Emu: ranap_unitdata_cb: call only when present ...................................................................... fix hnbgw: RAN_Emu: ranap_unitdata_cb: call only when present osmo-hnbgw since recently sends own RANAP RESET out to the CN links. So HNBGW_Tests.ttcn now receives a lot more UnitData messages. Turns out that tests crash when no UnitData callback is provided. Currently only osmo-hnbgw and RANAP, i.e. ranap_unitdata_cb, needs this fix, but also apply the same safeguard to the BSSAP unitdata_cb. Change-Id: I699a42de88b15f6f47b8feece7639e0dfaf31955 --- M library/RAN_Emulation.ttcnpp 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index 543df2b..6a1f784 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -515,6 +515,9 @@ log("CommonBssmapUnitdataCallback: Not a paging message"); } /* ELSE: handle in user callback */ + if (not ispresent(g_ran_ops.unitdata_cb)) { + return omit; + } return g_ran_ops.unitdata_cb.apply(bssap); } @@ -675,6 +678,9 @@ } /* ELSE: handle in user callback */ + if (not ispresent(g_ran_ops.ranap_unitdata_cb)) { + return omit; + } return g_ran_ops.ranap_unitdata_cb.apply(ranap); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33406 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: I699a42de88b15f6f47b8feece7639e0dfaf31955 Gerrit-Change-Number: 33406 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
neels