1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Fix data race condition detected by Coverity Scan

This commit is contained in:
Carles Fernandez 2019-07-05 16:14:33 +02:00
parent 755dd7901f
commit 76a14a86f0
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -664,6 +664,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
d_CRC_error_counter = 0; d_CRC_error_counter = 0;
d_flag_preamble = true; // valid preamble indicator (initialized to false every work()) 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) 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; d_last_valid_preamble = d_sample_counter;
if (!d_flag_frame_sync) if (!d_flag_frame_sync)
{ {