From 1efc4e678ae4d17a7ddcc2176011c75554b09fcf Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 18 Jan 2018 11:25:14 +0100 Subject: [PATCH 1/3] print error msg when UE DB wasn't found --- srsepc/src/hss/hss.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srsepc/src/hss/hss.cc b/srsepc/src/hss/hss.cc index 659933c7b..b236acc08 100644 --- a/srsepc/src/hss/hss.cc +++ b/srsepc/src/hss/hss.cc @@ -86,6 +86,7 @@ hss::init(hss_args_t *hss_args, srslte::log_filter *hss_log) /*Read user information from DB*/ if(read_db_file(hss_args->db_file) == false) { + m_hss_log->console("Error reading user database file %s\n", hss_args->db_file.c_str()); return -1; } @@ -140,7 +141,7 @@ hss::read_db_file(std::string db_filename) { return false; } - m_hss_log->info("Opended DB file: %s\n", db_filename.c_str() ); + m_hss_log->info("Opened DB file: %s\n", db_filename.c_str() ); std::string line; while (std::getline(m_db_file, line)) From 8eeaafba5686b370c46add5caebc447e2514b55a Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 18 Jan 2018 11:29:13 +0100 Subject: [PATCH 2/3] fix compiler warning --- srsepc/src/mme/mme_gtpc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsepc/src/mme/mme_gtpc.cc b/srsepc/src/mme/mme_gtpc.cc index a6f09148d..651eb4e49 100644 --- a/srsepc/src/mme/mme_gtpc.cc +++ b/srsepc/src/mme/mme_gtpc.cc @@ -217,7 +217,7 @@ mme_gtpc::send_delete_session_request(ue_ctx_t *ue_ctx) { m_mme_gtpc_log->info("Sending GTP-C Delete Session Request request\n"); srslte::gtpc_pdu del_req_pdu; - srslte::gtpc_f_teid_ie *sgw_ctrl_fteid; + 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? @@ -230,6 +230,8 @@ mme_gtpc::send_delete_session_request(ue_ctx_t *ue_ctx) break; } } + //FIXME: add proper error handling + assert(sgw_ctrl_fteid != NULL); srslte::gtpc_header *header = &del_req_pdu.header; header->teid_present = true; From 0d5c110246a02e811377f20156a333d4cf2c39ec Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 18 Jan 2018 11:38:03 +0100 Subject: [PATCH 3/3] specify flags when opening UE db --- srsepc/src/hss/hss.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsepc/src/hss/hss.cc b/srsepc/src/hss/hss.cc index b236acc08..0ccea844b 100644 --- a/srsepc/src/hss/hss.cc +++ b/srsepc/src/hss/hss.cc @@ -136,7 +136,7 @@ hss::set_auth_algo(std::string auth_algo) bool hss::read_db_file(std::string db_filename) { - m_db_file.open(db_filename.c_str()); + m_db_file.open(db_filename.c_str(), std::ifstream::in); if(!m_db_file.is_open()) { return false;