diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2018-07-16 17:27:56 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-07-20 14:51:41 +0300 |
commit | 1376bec5f390e9e8d0979fe09f600cf4e1412772 (patch) | |
tree | 0ae97001516309be0856d3468383fbe9c773388f /map/traffic_manager.cpp | |
parent | 260d119a03ad1e148e0e08824fc63daa0f3a9987 (diff) |
Fixed processing of the mwm deregistered notification.
Diffstat (limited to 'map/traffic_manager.cpp')
-rw-r--r-- | map/traffic_manager.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/map/traffic_manager.cpp b/map/traffic_manager.cpp index ee86e25dad..0792c4c1e4 100644 --- a/map/traffic_manager.cpp +++ b/map/traffic_manager.cpp @@ -140,13 +140,24 @@ void TrafficManager::SetCurrentDataVersion(int64_t dataVersion) m_currentDataVersion = dataVersion; } -void TrafficManager::OnMwmDeregistered(MwmSet::MwmId const & mwmId) +void TrafficManager::OnMwmDeregistered(platform::LocalCountryFile const & countryFile) { if (!IsEnabled()) return; { lock_guard<mutex> lock(m_mutex); + + MwmSet::MwmId mwmId; + for (auto const & cacheEntry : m_mwmCache) + { + if (cacheEntry.first.IsDeregistered(countryFile)) + { + mwmId = cacheEntry.first; + break; + } + } + ClearCache(mwmId); } } |