mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-15 02:20:09 +00:00
Fixed a bug that prevented the update of all shared map structures
(ephemeris, iono parameters, etc...)
This commit is contained in:
parent
7c0a614ca3
commit
eac73b5baa
@ -52,7 +52,15 @@ public:
|
||||
void write(int key, Data const& data)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(the_mutex);
|
||||
the_map.insert(std::pair<int, Data>(key, data));
|
||||
|
||||
Data_iterator data_iter;
|
||||
data_iter = the_map.find(key);
|
||||
if (data_iter != the_map.end())
|
||||
{
|
||||
data_iter->second=data; //update
|
||||
}else{
|
||||
the_map.insert(std::pair<int, Data>(key, data));//insert SILENTLY fails if the item exist in the map!!
|
||||
}
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user