From 0865571ec22547a7a5726d8ae5c6a6ccb555bacc Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 14 Dec 2017 08:38:37 +0000 Subject: [PATCH] Minor commit (clearing whitespaces, etc.) --- srsepc/src/mme/s1ap.cc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/srsepc/src/mme/s1ap.cc b/srsepc/src/mme/s1ap.cc index 370d7318a..a995da889 100644 --- a/srsepc/src/mme/s1ap.cc +++ b/srsepc/src/mme/s1ap.cc @@ -107,10 +107,10 @@ s1ap::stop() void s1ap::delete_enb_ctx(int32_t assoc_id) -{ +{ std::map::iterator it_assoc = m_sctp_to_enb_id.find(assoc_id); uint16_t enb_id = it_assoc->second; - + std::map::iterator it_ctx = m_active_enbs.find(enb_id); if(it_ctx == m_active_enbs.end() || it_assoc == m_sctp_to_enb_id.end()) { @@ -120,10 +120,10 @@ s1ap::delete_enb_ctx(int32_t assoc_id) m_s1ap_log->info("Deleting eNB context. eNB Id: 0x%x\n", enb_id); m_s1ap_log->console("Deleting eNB context. eNB Id: 0x%x\n", enb_id); - + //Delete connected UEs ctx delete_ues_in_enb(enb_id); - + //Delete eNB delete it_ctx->second; m_active_enbs.erase(it_ctx); @@ -149,7 +149,6 @@ s1ap::delete_ues_in_enb(uint16_t enb_id) } - int s1ap::get_s1_mme() { @@ -292,8 +291,8 @@ s1ap::handle_s1_setup_request(LIBLTE_S1AP_MESSAGE_S1SETUPREQUEST_STRUCT *msg, st //Log S1 Setup Request Info m_s1ap_log->console("Received S1 Setup Request. Association: %d\n",enb_sri->sinfo_assoc_id); print_enb_ctx_info(enb_ctx); - - //Check matching PLMNs + + //Check matching PLMNs if(enb_ctx.plmn!=m_plmn){ m_s1ap_log->console("Sending S1 Setup Failure - Unkown PLMN\n"); m_s1ap_log->info("Sending S1 Setup Failure - Unkown PLMN\n"); @@ -316,12 +315,12 @@ s1ap::handle_s1_setup_request(LIBLTE_S1AP_MESSAGE_S1SETUPREQUEST_STRUCT *msg, st m_sctp_to_enb_id.insert(std::pair(enb_sri->sinfo_assoc_id, enb_ptr->enb_id)); m_enb_id_to_ue_ids.insert(std::pair >(enb_ptr->enb_id,ue_set)); } - + m_s1ap_mngmt_proc.pack_s1_setup_response(m_s1ap_args, &reply_msg); m_s1ap_log->console("Sending S1 Setup Response\n"); m_s1ap_log->info("Sending S1 Setup Response\n"); } - + //Send Reply to eNB ssize_t n_sent = sctp_send(m_s1mme,reply_msg.msg, reply_msg.N_bytes, enb_sri, 0); if(n_sent == -1) @@ -329,9 +328,7 @@ s1ap::handle_s1_setup_request(LIBLTE_S1AP_MESSAGE_S1SETUPREQUEST_STRUCT *msg, st m_s1ap_log->console("Failed to send S1 Setup Setup Reply"); return false; } - return true; - } bool