diff options
-rw-r--r-- | src/components/policy/policy_external/src/cache_manager.cc | 4 | ||||
-rw-r--r-- | src/components/policy/policy_regular/src/cache_manager.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index a49d450a9e..70129e16d9 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -2649,6 +2649,10 @@ bool CacheManager::Init(const std::string& file_name, LOG4CXX_DEBUG(logger_, "Check if snapshot valid: " << std::boolalpha << result); + if (!UnwrapAppPolicies(pt_->policy_table.app_policies_section.apps)) { + LOG4CXX_ERROR(logger_, "Cannot unwrap application policies"); + } + if (result) { backup_->UpdateDBVersion(); Backup(); diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index 7a6f98f536..738e62f1dc 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -53,6 +53,7 @@ #include "utils/threads/thread.h" #include "utils/threads/thread_delegate.h" +#include "policy/policy_helper.h" #include "policy/sql_pt_representation.h" namespace policy_table = rpc::policy_table_interface_base; @@ -1816,6 +1817,10 @@ bool CacheManager::Init(const std::string& file_name, return result; } + if (!UnwrapAppPolicies(pt_->policy_table.app_policies_section.apps)) { + LOG4CXX_ERROR(logger_, "Cannot unwrap application policies"); + } + backup_->UpdateDBVersion(); Backup(); } break; |