dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33638 )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: S1AP_Emulation: delete UE association on 
S1AP_UeContextReleaseCmd
......................................................................

S1AP_Emulation: delete UE association on S1AP_UeContextReleaseCmd

When a S1AP_UeContextReleaseCmd is received, the UE association should
be deleted.

Related: OS#5760
Change-Id: I8c6f7a780945ce34dabdc794aabab5d16a3a73aa
---
M library/S1AP_Emulation.ttcn
1 file changed, 37 insertions(+), 3 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn
index 0671d08..1f23b66 100644
--- a/library/S1AP_Emulation.ttcn
+++ b/library/S1AP_Emulation.ttcn
@@ -342,6 +342,29 @@
 }
 */

+function handle_S1AP_UeContextReleaseCmd(template (present) S1AP_PDU rel_cmd) 
runs on S1AP_Emulation_CT {
+       if 
(ispresent(rel_cmd.initiatingMessage.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair))
 {
+               var template MME_UE_S1AP_ID mme_ue_id;
+               var template ENB_UE_S1AP_ID enb_ue_id;
+               var integer assoc_id;
+               var S1AP_ConnHdlr vc_conn
+
+               mme_ue_id := 
rel_cmd.initiatingMessage.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair.mME_UE_S1AP_ID;
+               enb_ue_id := 
rel_cmd.initiatingMessage.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair.eNB_UE_S1AP_ID;
+
+               assoc_id := f_assoc_id_by_s1ap_ids(mme_ue_id, enb_ue_id);
+               vc_conn := S1apAssociationTable[assoc_id].comp_ref;
+
+               f_s1ap_id_table_del(vc_conn, valueof(enb_ue_id));
+       } else {
+               /* TODO: The UE CONTEXT RELEASE COMMAND (see also: 3GPP TS 
36.413, section 9.1.4.6), may identify the
+                * context by either an uE_S1AP_ID_pair (MME_UE_S1AP_ID and 
ENB_UE_S1AP_ID) or an MME_UE_S1AP_ID alone.
+                * The latter case is not implemented here yet. */
+               setverdict(fail, "complete implementation of 
UeContextReleaseCmd handling");
+               mtc.stop;
+       }
+}
+
 function main(S1APOps ops, S1AP_conn_parameters p, charstring id) runs on 
S1AP_Emulation_CT {
        var Result res;
        g_pars := p;
@@ -427,9 +450,7 @@
                                        S1AP.send(t_S1AP_Send(g_s1ap_conn_id, 
valueof(resp)));
                                }
                        } else if (match(mrf.msg, tr_S1AP_UeContextReleaseCmd)) 
{
-                               /* TODO: special handling, as it contains 
multiple eNB or MME IDs */
-                               setverdict(fail, "implement UeContextReleaseCmd 
handling");
-                               mtc.stop;
+                               handle_S1AP_UeContextReleaseCmd(mrf.msg);
                        } else {
                                /* Ue-related S1AP message */
                                /* obtain MME + ENB UE S1AP ID */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33638
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: I8c6f7a780945ce34dabdc794aabab5d16a3a73aa
Gerrit-Change-Number: 33638
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to