Commit 39c82895 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Remove NGAP context after receiving UE context release complete

parent 8fbd98ca
...@@ -3103,6 +3103,9 @@ void amf_n1::ue_initiate_de_registration_handle( ...@@ -3103,6 +3103,9 @@ void amf_n1::ue_initiate_de_registration_handle(
} }
} }
// TODO: AMF-nitiated AM Policy Association Termination (if exist)
// TODO: AMF-initiated UE Policy Association Termination (if exist)
// Check Deregistration type // Check Deregistration type
uint8_t deregType = 0; uint8_t deregType = 0;
dereg_request->getDeregistrationType(deregType); dereg_request->getDeregistrationType(deregType);
...@@ -3127,7 +3130,7 @@ void amf_n1::ue_initiate_de_registration_handle( ...@@ -3127,7 +3130,7 @@ void amf_n1::ue_initiate_de_registration_handle(
bstring b = blk2bstr(buffer, encoded_size); bstring b = blk2bstr(buffer, encoded_size);
itti_send_dl_nas_buffer_to_task_n2(b, ran_ue_ngap_id, amf_ue_ngap_id); itti_send_dl_nas_buffer_to_task_n2(b, ran_ue_ngap_id, amf_ue_ngap_id);
// sleep 100ms // sleep 200ms
usleep(200000); usleep(200000);
} }
......
...@@ -1285,6 +1285,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) { ...@@ -1285,6 +1285,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) {
"No existed nas_context with amf_ue_ngap_id (" AMF_UE_NGAP_ID_FMT ")", "No existed nas_context with amf_ue_ngap_id (" AMF_UE_NGAP_ID_FMT ")",
amf_ue_ngap_id); amf_ue_ngap_id);
} }
if (nc != nullptr) { if (nc != nullptr) {
amf_n1_inst->set_5gcm_state(nc, CM_IDLE); amf_n1_inst->set_5gcm_state(nc, CM_IDLE);
...@@ -1394,6 +1395,9 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) { ...@@ -1394,6 +1395,9 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) {
} }
curl_responses.erase(curl_responses.begin()); curl_responses.erase(curl_responses.begin());
} }
// Remove UE NGAP context
remove_ue_context_with_ran_ue_ngap_id(ran_ue_ngap_id);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment