From f6ee0e1c8a49f53c0c27eacd902288ae14045349 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 21 Feb 2018 15:47:14 +0100 Subject: [PATCH] move byte_buffer to UE base class --- srsue/hdr/ue.h | 2 -- srsue/hdr/ue_base.h | 5 ++++- srsue/src/ue.cc | 2 -- srsue/src/ue_base.cc | 6 ++++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/srsue/hdr/ue.h b/srsue/hdr/ue.h index e36277461..e6c66b540 100644 --- a/srsue/hdr/ue.h +++ b/srsue/hdr/ue.h @@ -110,8 +110,6 @@ private: srslte::log_filter gw_log; srslte::log_filter usim_log; - srslte::byte_buffer_pool *pool; - all_args_t *args; bool started; diff --git a/srsue/hdr/ue_base.h b/srsue/hdr/ue_base.h index 256813d5f..201f63843 100644 --- a/srsue/hdr/ue_base.h +++ b/srsue/hdr/ue_base.h @@ -146,7 +146,7 @@ class ue_base { public: ue_base(); - virtual ~ue_base() {} + virtual ~ue_base(); static ue_base* get_instance(srsue_instance_type_t type); @@ -173,6 +173,9 @@ public: std::string get_build_mode(); std::string get_build_info(); std::string get_build_string(); + +private: + srslte::byte_buffer_pool *pool; }; } // namespace srsue diff --git a/srsue/src/ue.cc b/srsue/src/ue.cc index 2f8fa5794..1de1ddbd0 100644 --- a/srsue/src/ue.cc +++ b/srsue/src/ue.cc @@ -40,12 +40,10 @@ namespace srsue{ ue::ue() :started(false) { - pool = byte_buffer_pool::get_instance(); } ue::~ue() { - byte_buffer_pool::cleanup(); } bool ue::init(all_args_t *args_) diff --git a/srsue/src/ue_base.cc b/srsue/src/ue_base.cc index 4b2c372ae..a4264a099 100644 --- a/srsue/src/ue_base.cc +++ b/srsue/src/ue_base.cc @@ -64,6 +64,12 @@ ue_base::ue_base() { // load FFTW wisdom srslte_dft_load(); + + pool = byte_buffer_pool::get_instance(); +} + +ue_base::~ue_base() { + byte_buffer_pool::cleanup(); } void ue_base::cleanup(void)