Fix data race in bsr_proc::print_state().

While there, early exit if the log info channel is disabled to avoid formatting a string that will not be used.
master
faluco 3 years ago committed by Andre Puschmann
parent e3267c9dfd
commit 904d05d4c4

@ -41,6 +41,12 @@ void bsr_proc::init(sr_proc* sr_, rlc_interface_mac* rlc_, srsran::ext_task_sche
void bsr_proc::print_state()
{
if (!logger.info.enabled()) {
return;
}
std::lock_guard<std::mutex> lock(mutex);
char str[128];
str[0] = '\0';
int n = 0;

Loading…
Cancel
Save