mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Fixed a bug that prevented the update of all shared map structures
(ephemeris, iono parameters, etc...)
This commit is contained in:
		| @@ -52,7 +52,15 @@ public: | |||||||
|     void write(int key, Data const& data) |     void write(int key, Data const& data) | ||||||
|     { |     { | ||||||
|         boost::mutex::scoped_lock lock(the_mutex); |         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(); |         lock.unlock(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Javier Arribas
					Javier Arribas