diff --git a/lib/test/upper/CMakeLists.txt b/lib/test/upper/CMakeLists.txt index 81a5b514a..41f6a80de 100644 --- a/lib/test/upper/CMakeLists.txt +++ b/lib/test/upper/CMakeLists.txt @@ -46,7 +46,6 @@ add_test(rlc_um_data_test rlc_um_data_test) add_executable(rlc_um_test rlc_um_test.cc) target_link_libraries(rlc_um_test srslte_upper srslte_phy rrc_asn1) add_test(rlc_um_test rlc_um_test) - ######################################################################## # Option to run command after build (useful for remote builds) diff --git a/srsue/src/stack/upper/gw.cc b/srsue/src/stack/upper/gw.cc index f2735d573..3602cae09 100644 --- a/srsue/src/stack/upper/gw.cc +++ b/srsue/src/stack/upper/gw.cc @@ -352,10 +352,10 @@ void gw::run_thread() gw_log->info("GW IP receiver thread exiting.\n"); } -uint8_t gw::check_tft_filter_match(const srslte::unique_byte_buffer_t& pdu) { - +uint8_t gw::check_tft_filter_match(const srslte::unique_byte_buffer_t& pdu) +{ + std::lock_guard lock(tft_mutex); uint8_t lcid = default_lcid; - tft_mutex.lock(); for (std::pair& filter_pair : tft_filter_map) { bool match = filter_pair.second.match(pdu); if (match) { @@ -364,7 +364,6 @@ uint8_t gw::check_tft_filter_match(const srslte::unique_byte_buffer_t& pdu) { break; } } - tft_mutex.unlock(); return lcid; }