summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/src/access_remote_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_external/src/access_remote_impl.cc')
-rw-r--r--src/components/policy/policy_external/src/access_remote_impl.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/src/access_remote_impl.cc b/src/components/policy/policy_external/src/access_remote_impl.cc
index 037f4551f1..4effb991c8 100644
--- a/src/components/policy/policy_external/src/access_remote_impl.cc
+++ b/src/components/policy/policy_external/src/access_remote_impl.cc
@@ -98,6 +98,7 @@ bool AccessRemoteImpl::CheckModuleType(const PTString& app_id,
return false;
}
+ sync_primitives::AutoLock auto_lock(cache_->cache_lock_);
const policy_table::ApplicationParams& app =
cache_->pt_->policy_table.app_policies_section.apps[app_id];
if (!app.moduleType.is_initialized()) {
@@ -168,6 +169,7 @@ void AccessRemoteImpl::SetDefaultHmiTypes(const ApplicationOnDevice& who,
const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes(
const ApplicationOnDevice& who) {
SDL_LOG_AUTO_TRACE();
+ sync_primitives::AutoLock auto_lock(cache_->cache_lock_);
if (cache_->IsDefaultPolicy(who.app_id)) {
return hmi_types_[who];
} else {
@@ -240,6 +242,7 @@ void AccessRemoteImpl::GetGroupsIds(const std::string& device_id,
bool AccessRemoteImpl::GetModuleTypes(const std::string& application_id,
std::vector<std::string>* modules) {
DCHECK(modules);
+ sync_primitives::AutoLock auto_lock(cache_->cache_lock_);
policy_table::ApplicationPolicies& apps =
cache_->pt_->policy_table.app_policies_section.apps;
policy_table::ApplicationPolicies::iterator i = apps.find(application_id);