fix uninitialized variables in logger

master
Andre Puschmann 7 years ago
parent fa7d5bd40e
commit 705acec6b9

@ -70,6 +70,7 @@ public:
level = LOG_LEVEL_NONE;
hex_limit = 0;
show_layer_en = true;
add_string_en = false;
level_text_short = true;
}
@ -79,6 +80,7 @@ public:
level = LOG_LEVEL_NONE;
hex_limit = 0;
show_layer_en = true;
add_string_en = false;
level_text_short = true;
}

@ -36,6 +36,8 @@ namespace srslte{
logger_file::logger_file()
:inited(false)
,not_done(true)
,cur_length(0)
,max_length(0)
{}
logger_file::~logger_file() {
@ -48,11 +50,11 @@ logger_file::~logger_file() {
}
}
void logger_file::init(std::string file, int max_length) {
void logger_file::init(std::string file, int max_length_) {
pthread_mutex_init(&mutex, NULL);
pthread_cond_init(&not_empty, NULL);
pthread_cond_init(&not_full, NULL);
this->max_length = max_length*1024;
max_length = max_length_*1024;
name_idx = 0;
filename = file;
logfile = fopen(filename.c_str(), "w");

Loading…
Cancel
Save