From 97448c0a1fec5a2f62744543752310aa996e599f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 10 Jan 2018 12:35:26 +0100 Subject: [PATCH] fix uninitlized variable in logger and remove delegating ctor --- lib/include/srslte/common/log.h | 2 ++ lib/src/common/log_filter.cc | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/common/log.h b/lib/include/srslte/common/log.h index 71f47d197..93f7657cb 100644 --- a/lib/include/srslte/common/log.h +++ b/lib/include/srslte/common/log.h @@ -70,6 +70,7 @@ public: level = LOG_LEVEL_NONE; hex_limit = 0; show_layer_en = true; + level_text_short = true; } log(std::string service_name_) { @@ -78,6 +79,7 @@ public: level = LOG_LEVEL_NONE; hex_limit = 0; show_layer_en = true; + level_text_short = true; } // This function shall be called at the start of every tti for printing tti diff --git a/lib/src/common/log_filter.cc b/lib/src/common/log_filter.cc index f2fd2d61d..6720c21ad 100644 --- a/lib/src/common/log_filter.cc +++ b/lib/src/common/log_filter.cc @@ -43,14 +43,18 @@ log_filter::log_filter() } log_filter::log_filter(std::string layer) - :log_filter() { + do_tti = false; + time_src = NULL; + time_format = TIME; init(layer, &def_logger_stdout, tti); } log_filter::log_filter(std::string layer, logger *logger_, bool tti) - :log_filter() { + do_tti = false; + time_src = NULL; + time_format = TIME; init(layer, logger_, tti); }