From 0c50ccef1c9cf7067fe0ae38d9912aaa023d0daf Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 7 Mar 2018 15:36:08 +0000 Subject: [PATCH] Changed create session request to keep GTPC context. --- srsepc/hdr/mme/mme_gtpc.h | 4 ++-- srsepc/src/mme/mme_gtpc.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/srsepc/hdr/mme/mme_gtpc.h b/srsepc/hdr/mme/mme_gtpc.h index 992ccdae7..3c5fa27bf 100644 --- a/srsepc/hdr/mme/mme_gtpc.h +++ b/srsepc/hdr/mme/mme_gtpc.h @@ -72,8 +72,8 @@ private: in_addr_t m_mme_gtpc_ip; uint32_t m_next_ctrl_teid; - std::map m_ctr_teid_to_imsi; - std::map m_imsi_to_ctr_fteid; + std::map m_mme_ctr_teid_to_imsi; + std::map m_imsi_to_gtpc_ctx; }; diff --git a/srsepc/src/mme/mme_gtpc.cc b/srsepc/src/mme/mme_gtpc.cc index 3e35844b2..41f025083 100644 --- a/srsepc/src/mme/mme_gtpc.cc +++ b/srsepc/src/mme/mme_gtpc.cc @@ -124,21 +124,21 @@ mme_gtpc::send_create_session_request(uint64_t imsi, bool pack_attach) //cs_req->rat_type = srslte::GTPC_RAT_TYPE::EUTRAN; //Check whether this UE is already registed - std::map::iterator it = m_imsi_to_gtpc_ctx.find(imsi); - if(it == m_imsi_to_ctr_fteid.end()) + std::map::iterator it = m_imsi_to_gtpc_ctx.find(imsi); + if(it == m_imsi_to_gtpc_ctx.end()) { m_mme_gtpc_log->warning("Create Session Request being called for an UE with an active GTP-C connection.\n"); m_mme_gtpc_log->warning("Deleting previous GTP-C connection.\n"); std::map::iterator jt = m_mme_ctr_teid_to_imsi.find(it->second.mme_ctr_fteid.teid); - if(jt == m_ctr_teid_to_imsi.end()) + if(jt == m_mme_ctr_teid_to_imsi.end()) { - m_mme_gtpc_log->error("Could not find IMSI from MME Ctrl TEID.\n") + m_mme_gtpc_log->error("Could not find IMSI from MME Ctrl TEID. MME Ctr TEID: %d\n", it->second.mme_ctr_fteid.teid); } else { - m_ctr_teid_to_imsi.erease(jt); + m_mme_ctr_teid_to_imsi.erase(jt); } - m_imsi_to_ctr_fteid.erease(it); + m_imsi_to_gtpc_ctx.erase(it); //No need to send delete session request to the SPGW. //The create session request will be interpreted as a new request and SPGW will delete locally in existing context. }