Fix data race in sync::current_earfcn.

This commit is contained in:
faluco 2021-10-26 12:07:36 +02:00 committed by Ismael Gomez
parent 92b81b200f
commit b058945142
1 changed files with 1 additions and 0 deletions

View File

@ -944,6 +944,7 @@ void sync::get_current_cell(srsran_cell_t* cell_, uint32_t* earfcn_)
*cell_ = cell.get();
}
if (earfcn_) {
std::unique_lock<std::mutex> ul(rrc_mutex);
*earfcn_ = current_earfcn;
}
}