Commit aa136b9c authored by yangjian's avatar yangjian

add deregistration process

parent 8c32ec5c
......@@ -2714,6 +2714,18 @@ void amf_n1::ue_initiate_de_registration_handle(uint32_t ran_ue_ngap_id,
bstring b = blk2bstr(buffer, encoded_size);
itti_send_dl_nas_buffer_to_task_n2(b, ran_ue_ngap_id, amf_ue_ngap_id);
Logger::ngap().debug("sending itti ue context release command to TASK_AMF_N2");
itti_ue_context_release_command * itti_msg = new itti_ue_context_release_command(TASK_AMF_N1, TASK_AMF_N2);
itti_msg->amf_ue_ngap_id = amf_ue_ngap_id;
itti_msg->ran_ue_ngap_id = ran_ue_ngap_id;
itti_msg->cause.setChoiceOfCause(Ngap_Cause_PR_nas);
itti_msg->cause.setValue(Ngap_CauseNas_deregister);
std::shared_ptr<itti_ue_context_release_command> i = std::shared_ptr<itti_ue_context_release_command>(itti_msg);
int ret = itti_inst->send_msg(i);
if (ret != 0) {
Logger::ngap().error("Could not send ITTI message %s to task TASK_AMF_N2", i->get_msg_name());
}
set_5gmm_state(nc, _5GMM_DEREGISTERED);
if (nc.get()->is_stacs_available) {
stacs.update_5gmm_state(nc.get()->imsi, "5GMM-DEREGISTERED");
......
......@@ -902,12 +902,12 @@ void amf_n2::handle_itti_message(itti_ue_context_release_command& itti_msg) {
if (itti_msg.cause.getChoiceOfCause() == Ngap_Cause_PR_nas) {
ueCtxRelCmd->setCauseNas((e_Ngap_CauseNas) itti_msg.cause.getValue());
}
if (itti_msg.cause.getChoiceOfCause() == Ngap_Cause_PR_radioNetwork) {
else if (itti_msg.cause.getChoiceOfCause() == Ngap_Cause_PR_radioNetwork) {
ueCtxRelCmd->setCauseRadioNetwork(
(e_Ngap_CauseRadioNetwork) itti_msg.cause.getValue());
}
uint8_t buffer[200];
int encoded_size = ueCtxRelCmd->encode2buffer(buffer, 200);
uint8_t buffer[BUFFER_SIZE_512];
int encoded_size = ueCtxRelCmd->encode2buffer(buffer, BUFFER_SIZE_512);
delete ueCtxRelCmd;
bstring b = blk2bstr(buffer, encoded_size);
sctp_s_38412.sctp_send_msg(
......
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