diff --git a/lib/include/srsran/rlc/rlc_am_lte.h b/lib/include/srsran/rlc/rlc_am_lte.h index 0c3f53c18..fb6489530 100644 --- a/lib/include/srsran/rlc/rlc_am_lte.h +++ b/lib/include/srsran/rlc/rlc_am_lte.h @@ -387,6 +387,8 @@ private: void set_bsr_callback(bsr_callback_t callback); private: + void stop_nolock(); + int build_status_pdu(uint8_t* payload, uint32_t nof_bytes); int build_retx_pdu(uint8_t* payload, uint32_t nof_bytes); int build_segment(uint8_t* payload, uint32_t nof_bytes, rlc_amd_retx_t retx); diff --git a/lib/src/rlc/rlc_am_lte.cc b/lib/src/rlc/rlc_am_lte.cc index b32f910c6..b4fc46321 100644 --- a/lib/src/rlc/rlc_am_lte.cc +++ b/lib/src/rlc/rlc_am_lte.cc @@ -343,7 +343,11 @@ bool rlc_am_lte::rlc_am_lte_tx::configure(const rlc_config_t& cfg_) void rlc_am_lte::rlc_am_lte_tx::stop() { std::lock_guard lock(mutex); + stop_nolock(); +} +void rlc_am_lte::rlc_am_lte_tx::stop_nolock() +{ empty_queue_nolock(); tx_enabled = false; @@ -396,7 +400,8 @@ void rlc_am_lte::rlc_am_lte_tx::empty_queue_nolock() void rlc_am_lte::rlc_am_lte_tx::reestablish() { - stop(); + std::lock_guard lock(mutex); + stop_nolock(); tx_enabled = true; }