diff --git a/srsenb/hdr/phy/phy_common.h b/srsenb/hdr/phy/phy_common.h index 3d16c4371..0cb27581c 100644 --- a/srsenb/hdr/phy/phy_common.h +++ b/srsenb/hdr/phy/phy_common.h @@ -301,6 +301,7 @@ private: bool have_mtch_stop = false; std::mutex mtch_mutex; + std::mutex mbsfn_mutex; std::condition_variable mtch_cvar; srsran::phy_cfg_mbsfn_t mbsfn = {}; bool sib13_configured = false; diff --git a/srsenb/src/phy/phy_common.cc b/srsenb/src/phy/phy_common.cc index f5dc8131d..d3bac4986 100644 --- a/srsenb/src/phy/phy_common.cc +++ b/srsenb/src/phy/phy_common.cc @@ -60,9 +60,12 @@ bool phy_common::init(const phy_cell_cfg_list_t& cell_list_, if (!cell_list_lte.empty()) { ue_db.init(stack, params, cell_list_lte); } - if (mcch_configured) { - build_mch_table(); - build_mcch_table(); + { + std::lock_guard lock(mbsfn_mutex); + if (mcch_configured) { + build_mch_table(); + build_mcch_table(); + } } reset(); @@ -168,6 +171,7 @@ void phy_common::set_mch_period_stop(uint32_t stop) void phy_common::configure_mbsfn(srsran::phy_cfg_mbsfn_t* cfg) { + std::lock_guard lock(mbsfn_mutex); mbsfn = *cfg; sib13_configured = true; mcch_configured = true;