From b6d0fcfdbe36b740874de8146a4929dd1e317139 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 17 Nov 2017 12:28:05 +0000 Subject: [PATCH] Renamed s-gw to sp-gw. --- srsepc/hdr/{sgw/sgw.h => spgw/spgw.h} | 24 ++++++++--------- srsepc/src/CMakeLists.txt | 2 +- srsepc/src/{sgw => spgw}/CMakeLists.txt | 0 srsepc/src/{sgw/sgw.cc => spgw/spgw.cc} | 34 ++++++++++++------------- 4 files changed, 30 insertions(+), 30 deletions(-) rename srsepc/hdr/{sgw/sgw.h => spgw/spgw.h} (82%) rename srsepc/src/{sgw => spgw}/CMakeLists.txt (100%) rename srsepc/src/{sgw/sgw.cc => spgw/spgw.cc} (73%) diff --git a/srsepc/hdr/sgw/sgw.h b/srsepc/hdr/spgw/spgw.h similarity index 82% rename from srsepc/hdr/sgw/sgw.h rename to srsepc/hdr/spgw/spgw.h index 85faa4c21..121daeee2 100644 --- a/srsepc/hdr/sgw/sgw.h +++ b/srsepc/hdr/spgw/spgw.h @@ -25,13 +25,13 @@ */ /****************************************************************************** - * File: sgw.h - * Description: Top-level S-GW class. Creates and links all + * File: spgw.h + * Description: Top-level SP-GW class. Creates and links all * interfaces and helpers. *****************************************************************************/ -#ifndef SGW_H -#define SGW_H +#ifndef SPGW_H +#define SPGW_H #include #include "srslte/common/log.h" @@ -44,30 +44,30 @@ namespace srsepc{ typedef struct { std::string gtpc_bind_addr; -} sgw_args_t; +} spgw_args_t; -class sgw: +class spgw: public thread { public: - static sgw* get_instance(void); + static spgw* get_instance(void); static void cleanup(void); - int init(sgw_args_t* args, srslte::log_filter *sgw_log); + int init(spgw_args_t* args, srslte::log_filter *spgw_log); void stop(); void run_thread(); private: - sgw(); - virtual ~sgw(); - static sgw *m_instance; + spgw(); + virtual ~spgw(); + static spgw *m_instance; bool m_running; srslte::byte_buffer_pool *m_pool; /*Logs*/ - srslte::log_filter *m_sgw_log; + srslte::log_filter *m_spgw_log; }; diff --git a/srsepc/src/CMakeLists.txt b/srsepc/src/CMakeLists.txt index 6ce5e44db..e6f4c2538 100644 --- a/srsepc/src/CMakeLists.txt +++ b/srsepc/src/CMakeLists.txt @@ -1,7 +1,7 @@ add_subdirectory(mme) add_subdirectory(hss) -add_subdirectory(sgw) +add_subdirectory(spgw) # Link libstdc++ and libgcc if(BUILD_STATIC) diff --git a/srsepc/src/sgw/CMakeLists.txt b/srsepc/src/spgw/CMakeLists.txt similarity index 100% rename from srsepc/src/sgw/CMakeLists.txt rename to srsepc/src/spgw/CMakeLists.txt diff --git a/srsepc/src/sgw/sgw.cc b/srsepc/src/spgw/spgw.cc similarity index 73% rename from srsepc/src/sgw/sgw.cc rename to srsepc/src/spgw/spgw.cc index 6293b57d5..3497afadb 100644 --- a/srsepc/src/sgw/sgw.cc +++ b/srsepc/src/spgw/spgw.cc @@ -26,39 +26,39 @@ #include #include -#include "sgw/sgw.h" +#include "spgw/spgw.h" namespace srsepc{ -sgw* sgw::m_instance = NULL; -boost::mutex sgw_instance_mutex; +spgw* spgw::m_instance = NULL; +boost::mutex spgw_instance_mutex; -sgw::sgw(): +spgw::spgw(): m_running(false) { m_pool = srslte::byte_buffer_pool::get_instance(); return; } -sgw::~sgw() +spgw::~spgw() { return; } -sgw* -sgw::get_instance(void) +spgw* +spgw::get_instance(void) { - boost::mutex::scoped_lock lock(sgw_instance_mutex); + boost::mutex::scoped_lock lock(spgw_instance_mutex); if(NULL == m_instance) { - m_instance = new sgw(); + m_instance = new spgw(); } return(m_instance); } void -sgw::cleanup(void) +spgw::cleanup(void) { - boost::mutex::scoped_lock lock(sgw_instance_mutex); + boost::mutex::scoped_lock lock(spgw_instance_mutex); if(NULL != m_instance) { delete m_instance; m_instance = NULL; @@ -66,17 +66,17 @@ sgw::cleanup(void) } int -sgw::init(sgw_args_t* args, srslte::log_filter *sgw_log) +spgw::init(spgw_args_t* args, srslte::log_filter *spgw_log) { - m_sgw_log = sgw_log; - m_sgw_log->info("S-GW Initialized.\n"); - m_sgw_log->console("S-GW Initialized.\n"); + m_spgw_log = spgw_log; + m_spgw_log->info("SP-GW Initialized.\n"); + m_spgw_log->console("SP-GW Initialized.\n"); return 0; } void -sgw::stop() +spgw::stop() { if(m_running) { @@ -88,7 +88,7 @@ sgw::stop() } void -sgw::run_thread() +spgw::run_thread() { //Mark the thread as running m_running=true;