Changing handling of ue context release request. Compiling now, needs testing.

master
Pedro Alvarez 7 years ago
parent 0c013c19ca
commit af927eb1d8

@ -52,7 +52,7 @@ public:
void handle_create_session_response(srslte::gtpc_pdu *cs_resp_pdu);
void send_modify_bearer_request(erab_ctx_t *bearer_ctx);
void handle_modify_bearer_response(srslte::gtpc_pdu *mb_resp_pdu);
void send_delete_session_request(ue_ctx_t *ue_ctx);
void send_delete_session_request(ue_ecm_ctx_t *ue_ecm_ctx);
private:

@ -219,7 +219,7 @@ mme_gtpc::handle_modify_bearer_response(srslte::gtpc_pdu *mb_resp_pdu)
}
void
mme_gtpc::send_delete_session_request(ue_ctx_t *ue_ctx)
mme_gtpc::send_delete_session_request(ue_ecm_ctx_t *ue_ecm_ctx)
{
m_mme_gtpc_log->info("Sending GTP-C Delete Session Request request\n");
srslte::gtpc_pdu del_req_pdu;
@ -230,9 +230,9 @@ mme_gtpc::send_delete_session_request(ue_ctx_t *ue_ctx)
for(int i = 0; i<MAX_ERABS_PER_UE; i++)
{
if(ue_ctx->erabs_ctx[i].state != ERAB_DEACTIVATED)
if(ue_ecm_ctx->erabs_ctx[i].state != ERAB_DEACTIVATED)
{
sgw_ctrl_fteid = &ue_ctx->erabs_ctx[i].sgw_ctrl_fteid;
sgw_ctrl_fteid = &ue_ecm_ctx->erabs_ctx[i].sgw_ctrl_fteid;
break;
}
}

@ -272,8 +272,8 @@ s1ap_ctx_mngmt_proc::handle_ue_context_release_request(LIBLTE_S1AP_MESSAGE_UECON
m_s1ap_log->info("Received UE Context Release Request. MME-UE S1AP Id: %d\n", mme_ue_s1ap_id);
m_s1ap_log->console("Received UE Context Release Request. MME-UE S1AP Id %d\n", mme_ue_s1ap_id);
ue_ctx_t *ue_ctx = m_s1ap->find_ue_ctx(mme_ue_s1ap_id);
if(ue_ctx == NULL)
ue_ecm_ctx_t *ue_ecm_ctx = m_s1ap->find_ue_ecm_ctx_from_mme_ue_s1ap_id(mme_ue_s1ap_id);
if(ue_ecm_ctx == NULL)
{
m_s1ap_log->info("UE not found. MME-UE S1AP Id: %d\n", mme_ue_s1ap_id);
return false;
@ -283,7 +283,7 @@ s1ap_ctx_mngmt_proc::handle_ue_context_release_request(LIBLTE_S1AP_MESSAGE_UECON
bool active = false;
for(int i=0;i<MAX_ERABS_PER_UE;i++)
{
if(ue_ctx->erabs_ctx[i].state != ERAB_DEACTIVATED)
if(ue_ecm_ctx->erabs_ctx[i].state != ERAB_DEACTIVATED) //FIXME use ECM state
{
active = true;
//ue_ctx->erabs_ctx[i].state = ERAB_DEACTIVATED;
@ -293,14 +293,16 @@ s1ap_ctx_mngmt_proc::handle_ue_context_release_request(LIBLTE_S1AP_MESSAGE_UECON
if(active == true)
{
//There are active E-RABs, send delete session request
m_mme_gtpc->send_delete_session_request(ue_ctx);
m_mme_gtpc->send_delete_session_request(ue_ecm_ctx);
}
//m_s1ap->delete_ue_ctx(ue_ctx);
for(int i=0;i<MAX_ERABS_PER_UE;i++)
{
ue_ctx->erabs_ctx[i].state = ERAB_DEACTIVATED;
ue_ecm_ctx->erabs_ctx[i].state = ERAB_DEACTIVATED;
}
//Delete UE context
m_s1ap->delete_ue_ecm_ctx(ue_ecm_ctx->mme_ue_s1ap_id);
m_s1ap_log->info("Deleted UE Context.\n");
return true;
}

Loading…
Cancel
Save