Commit 7f07f1df authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Remove UE context after receiving NGAP SHUTDOWN

parent 1b6e12d3
......@@ -417,9 +417,10 @@ void amf_n2::handle_itti_message(itti_ng_shutdown& itti_msg) {
gc.get()->ng_state = NGAP_SHUTDOWN;
// Release all the resources related to this interface
uint32_t ran_ue_ngap_id = 0;
for (auto ue_context : ranid2uecontext) {
if (ue_context.second->gnb_assoc_id == itti_msg.assoc_id) {
uint32_t ran_ue_ngap_id = ue_context.second->ran_ue_ngap_id;
ran_ue_ngap_id = ue_context.second->ran_ue_ngap_id;
long amf_ue_ngap_id = ue_context.second->amf_ue_ngap_id;
// get NAS context
std::shared_ptr<nas_context> nc;
......@@ -432,6 +433,10 @@ void amf_n2::handle_itti_message(itti_ng_shutdown& itti_msg) {
}
}
}
// remove UE context
if (ranid2uecontext.count(ran_ue_ngap_id) > 0) {
ranid2uecontext.erase(ran_ue_ngap_id);
}
// Delete gNB context
remove_gnb_context(itti_msg.assoc_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