Commit 54c1eb25 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Update UE-related context after receiving Service Request msg

parent 4968a4f5
......@@ -280,6 +280,16 @@ void amf_app::handle_itti_message(
set_ran_amf_id_2_ue_context(ue_context_key, uc);
}
// Update AMF UE NGAP ID
std::shared_ptr<ue_ngap_context> unc = {};
if (!amf_n2_inst->is_ran_ue_id_2_ue_ngap_context(itti_msg.ran_ue_ngap_id)) {
Logger::amf_n1().error(
"Could not find UE NGAP Context with ran_ue_ngap_id (0x%x)",
itti_msg.ran_ue_ngap_id);
} else {
unc.get()->amf_ue_ngap_id = amf_ue_ngap_id;
}
if (uc.get() == nullptr) {
Logger::amf_app().error(
"Failed to create ue_context with ran_amf_id %s",
......
......@@ -588,7 +588,17 @@ void amf_n1::service_request_handle(
uc->copy_pdu_sessions(old_uc);
amf_app_inst->set_supi_2_ue_context(supi, uc);
}
/*
//Update AMF UE NGAP ID
std::shared_ptr<ue_ngap_context> unc = {};
if (!amf_n2_inst->is_ran_ue_id_2_ue_ngap_context(ran_ue_ngap_id)) {
Logger::amf_n1().error(
"Could not find UE NGAP Context with ran_ue_ngap_id (0x%x)",
ran_ue_ngap_id);
} else {
unc.get()->amf_ue_ngap_id = amf_ue_ngap_id;
}
*/
// associate SUPI with UC
amf_app_inst->set_supi_2_ue_context(supi, uc);
......
......@@ -111,7 +111,7 @@ void PduSessionResourceReleaseResponseMsg::setAmfUeNgapId(unsigned long id) {
ret = ASN_SEQUENCE_ADD(
&pduSessionResourceReleaseResponseIEs->protocolIEs.list, ie);
if (ret != 0) Logger::nas_mm().warn("Encode AMF_UE_NGAP_ID IE error");
//free_wrapper((void**) &ie);
// free_wrapper((void**) &ie);
}
//------------------------------------------------------------------------------
......@@ -138,7 +138,7 @@ void PduSessionResourceReleaseResponseMsg::setRanUeNgapId(
ret = ASN_SEQUENCE_ADD(
&pduSessionResourceReleaseResponseIEs->protocolIEs.list, ie);
if (ret != 0) Logger::nas_mm().warn("Encode RAN_UE_NGAP_ID IE error");
//free_wrapper((void**) &ie);
// free_wrapper((void**) &ie);
}
//------------------------------------------------------------------------------
......@@ -185,7 +185,7 @@ void PduSessionResourceReleaseResponseMsg::setPduSessionResourceReleasedList(
if (ret != 0)
Logger::nas_mm().warn(
"Encode PDUSessionResourceReleasedListRelRes IE error");
//free_wrapper((void**) &ie);
// free_wrapper((void**) &ie);
}
//------------------------------------------------------------------------------
......@@ -231,7 +231,7 @@ void PduSessionResourceReleaseResponseMsg::setUserLocationInfoNR(
&pduSessionResourceReleaseResponseIEs->protocolIEs.list, ie);
if (ret != 0)
Logger::nas_mm().warn("Encode UserLocationInformation IE error");
//free_wrapper((void**) &ie);
// free_wrapper((void**) &ie);
}
//------------------------------------------------------------------------------
......@@ -298,7 +298,7 @@ bool PduSessionResourceReleaseResponseMsg::decodefrompdu(
pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]->id) {
case Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID: {
if (pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_reject &&
->criticality == Ngap_Criticality_ignore &&
pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_PDUSessionResourceReleaseResponseIEs__value_PR_AMF_UE_NGAP_ID) {
......@@ -318,7 +318,7 @@ bool PduSessionResourceReleaseResponseMsg::decodefrompdu(
case Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID: {
if (pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_reject &&
->criticality == Ngap_Criticality_ignore &&
pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_PDUSessionResourceReleaseResponseIEs__value_PR_RAN_UE_NGAP_ID) {
......@@ -338,7 +338,7 @@ bool PduSessionResourceReleaseResponseMsg::decodefrompdu(
case Ngap_ProtocolIE_ID_id_PDUSessionResourceReleasedListRelRes: {
if (pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_reject &&
->criticality == Ngap_Criticality_ignore &&
pduSessionResourceReleaseResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_PDUSessionResourceReleaseResponseIEs__value_PR_PDUSessionResourceReleasedListRelRes) {
......
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