From 76a14a86f017b4b6d70967856b671bff53a94147 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 5 Jul 2019 16:14:33 +0200 Subject: [PATCH] Fix data race condition detected by Coverity Scan --- .../gnuradio_blocks/galileo_telemetry_decoder_gs.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc index a94aebcf8..b73690f0e 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc @@ -664,6 +664,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( d_CRC_error_counter = 0; d_flag_preamble = true; // valid preamble indicator (initialized to false every work()) d_preamble_index = d_sample_counter; // record the preamble sample stamp (t_P) + gr::thread::scoped_lock lock(d_setlock); d_last_valid_preamble = d_sample_counter; if (!d_flag_frame_sync) {