From a5bb8076a0fdc24952ef13acdde2b3ae9c1de568 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 21 Dec 2023 19:15:31 +0100 Subject: [PATCH] S1AP_Emulation: Allow retrieving {MME,ENB}_UE_ID from UeContextReleaseCmd It's not true that it can contain several IDs. The only difference is that it has a choice IE which can hold a pair containing both MME/ENB UE IDs, or only MME_UE_ID. Change-Id: I4fb51f3f50fa10400184b65d272530ea26a2bc8e --- library/S1AP_Emulation.ttcn | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn index 9f3622512..401a26eaf 100644 --- a/library/S1AP_Emulation.ttcn +++ b/library/S1AP_Emulation.ttcn @@ -699,7 +699,13 @@ function f_S1AP_get_ENB_UE_S1AP_ID(S1AP_PDU s1ap) return template (omit) ENB_UE_ case (tr_S1AP_UeContextReleaseReq) { return im.value_.UEContextReleaseRequest.protocolIEs[1].value_.ENB_UE_S1AP_ID; } - /* UeContextReleaseCmd needs special handling; it can contain any number of MME/UE IDs */ + case (tr_S1AP_UeContextReleaseCmd) { + if (ispresent(im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair)) { + return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair.eNB_UE_S1AP_ID; + } else { + return omit; + } + } case (tr_S1AP_ConnEstInd) { return im.value_.ConnectionEstablishmentIndication.protocolIEs[1].value_.ENB_UE_S1AP_ID; } @@ -745,7 +751,13 @@ function f_S1AP_get_MME_UE_S1AP_ID(S1AP_PDU s1ap) return template (omit) MME_UE_ case (tr_S1AP_UeContextReleaseReq) { return im.value_.UEContextReleaseRequest.protocolIEs[0].value_.MME_UE_S1AP_ID; } - /* UeContextReleaseCmd needs special handling; it can contain any number of MME/UE IDs */ + case (tr_S1AP_UeContextReleaseCmd) { + if (ispresent(im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair)) { + return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair.mME_UE_S1AP_ID; + } else { + return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.mME_UE_S1AP_ID; + } + } case (tr_S1AP_ConnEstInd) { return im.value_.ConnectionEstablishmentIndication.protocolIEs[0].value_.MME_UE_S1AP_ID; }