From ef4ad0aa20bf913a2132cb3537ed88d9698c830d Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 7 Mar 2018 19:15:32 +0000 Subject: [PATCH] Starting to change delete session request. --- srsepc/src/mme/mme_gtpc.cc | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/srsepc/src/mme/mme_gtpc.cc b/srsepc/src/mme/mme_gtpc.cc index ff603e14d..015ce5093 100644 --- a/srsepc/src/mme/mme_gtpc.cc +++ b/srsepc/src/mme/mme_gtpc.cc @@ -303,25 +303,13 @@ mme_gtpc::handle_modify_bearer_response(srslte::gtpc_pdu *mb_resp_pdu) } void -mme_gtpc::send_delete_session_request(ue_ecm_ctx_t *ue_ecm_ctx) +mme_gtpc::send_delete_session_request(uint64_t imsi) { - m_mme_gtpc_log->info("Sending GTP-C Delete Session Request request\n"); + m_mme_gtpc_log->info("Sending GTP-C Delete Session Request request. IMSI %d\n",imsi); srslte::gtpc_pdu del_req_pdu; - srslte::gtpc_f_teid_ie *sgw_ctrl_fteid = NULL; - - //FIXME the UE control TEID sould be stored in the UE ctxt, not in the E-RAB ctxt - //Maybe a mme_s1ap_id to ctrl teid map as well? + srslte::gtp_fteid_t sgw_ctrl_fteid; - for(int i = 0; ierabs_ctx[i].state != ERAB_DEACTIVATED) - { - sgw_ctrl_fteid = &ue_ecm_ctx->erabs_ctx[i].sgw_ctrl_fteid; - break; - } - } - //FIXME: add proper error handling - assert(sgw_ctrl_fteid != NULL); + std::map::iterator it = m_imsi_to_gtpc_ctx.find(imsi); srslte::gtpc_header *header = &del_req_pdu.header; header->teid_present = true;