Fix data race in sync::current_earfcn.

master
faluco 3 years ago committed by Ismael Gomez
parent 92b81b200f
commit b058945142

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

Loading…
Cancel
Save