[S] Change in osmo-ttcn3-hacks[master]: RUA_Emulation: Support passing no RANAP PDU in RUA_Disc_Req
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38573?usp=email ) Change subject: RUA_Emulation: Support passing no RANAP PDU in RUA_Disc_Req ...................................................................... RUA_Emulation: Support passing no RANAP PDU in RUA_Disc_Req Change-Id: Id9c3d5a1e45aa6ca58a71b61e142dc041a335cc9 --- M hnbgw/ConnHdlr.ttcn M library/rua/RUA_Emulation.ttcn M library/rua/RUA_Templates.ttcn 3 files changed, 40 insertions(+), 5 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn index 2a46bba..803ed8a 100644 --- a/hnbgw/ConnHdlr.ttcn +++ b/hnbgw/ConnHdlr.ttcn @@ -362,7 +362,7 @@ } /* send it via Iuh (creating a RUA connection) */ - RUA.send(RUA_Disc_Req:{tx, cause}); + RUA.send(RUA_Disc_Req:{cause, tx}); /* expect to receive it on the Iu side */ rx := f_bssap_expect(exp_rx); diff --git a/library/rua/RUA_Emulation.ttcn b/library/rua/RUA_Emulation.ttcn index a9c445e..26c2da7 100644 --- a/library/rua/RUA_Emulation.ttcn +++ b/library/rua/RUA_Emulation.ttcn @@ -65,8 +65,8 @@ }; type record RUA_Disc_Req { - RANAP_PDU ranap, - RUA_IEs.Cause cause + RUA_IEs.Cause cause, + RANAP_PDU ranap optional }; type record RUA_Disc_Ind { @@ -327,11 +327,15 @@ /* Disconnect request from client */ [] CLIENT.receive(RUA_Disc_Req:?) -> value dreq sender vc_conn { - var octetstring enc_ranap := enc_RANAP_PDU(dreq.ranap); var integer idx := f_idx_by_comp(vc_conn); context_id := int2bit(ConnectionTable[idx].context_id, 24); domain_ind := ConnectionTable[idx].domain; - RUA.send(ts_RUA_Disconnect(domain_ind, context_id, dreq.cause, enc_ranap)); + if (ispresent(dreq.ranap)) { + var octetstring enc_ranap := enc_RANAP_PDU(dreq.ranap); + RUA.send(ts_RUA_Disconnect(domain_ind, context_id, dreq.cause, enc_ranap)); + } else { + RUA.send(ts_RUA_Disconnect_no_ranap(domain_ind, context_id, dreq.cause)); + } f_conn_table_del(context_id); } diff --git a/library/rua/RUA_Templates.ttcn b/library/rua/RUA_Templates.ttcn index 738042e..6ff91cd 100644 --- a/library/rua/RUA_Templates.ttcn +++ b/library/rua/RUA_Templates.ttcn @@ -196,6 +196,37 @@ } } +/* Same as ts_RUA_Disconnect() but without a ranap arg */ +template (value) RUA_PDU +ts_RUA_Disconnect_no_ranap(template (value) CN_DomainIndicator domain, + template (value) bitstring context_id, + template (value) Cause cause) := { + initiatingMessage := { + procedureCode := 3, + criticality := reject, + value_ := { + disconnect_ := { + protocolIEs := { + { + id := 7, + criticality := reject, + value_ := { cN_DomainIndicator := domain } + }, { + id := 3, + criticality := reject, + value_ := { context_ID := context_id } + }, { + id := 1, + criticality := reject, + value_ := { cause := cause } + } + }, + protocolExtensions := omit + } + } + } +} + template (present) RUA_PDU tr_RUA_Disconnect(template (present) CN_DomainIndicator domain := ?, template (present) bitstring context_id := ?, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38573?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id9c3d5a1e45aa6ca58a71b61e142dc041a335cc9 Gerrit-Change-Number: 38573 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
pespin