diff options
-rw-r--r-- | src/components/application_manager/src/policies/policy_handler.cc | 4 | ||||
-rw-r--r-- | src/components/policy/policy_regular/src/cache_manager.cc | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc index cee33b229b..11decf45c3 100644 --- a/src/components/application_manager/src/policies/policy_handler.cc +++ b/src/components/application_manager/src/policies/policy_handler.cc @@ -1656,6 +1656,10 @@ std::string PolicyHandler::GetNextUpdateUrl( POLICY_LIB_CHECK_OR_RETURN(std::string()); app_id = ChoosePTUApplication(iteration_type); + if (0 == app_id) { + return std::string(); + } + // Use cached URL for retries if it was provided by the HMI if (PTUIterationType::RetryIteration == iteration_type && !retry_update_url_.empty()) { diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index 8227090f5f..28ceec3ccb 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -1412,6 +1412,10 @@ std::shared_ptr<policy_table::Table> CacheManager::GenerateSnapshot() { snapshot_->policy_table.module_meta = pt_->policy_table.module_meta; snapshot_->policy_table.usage_and_error_counts = pt_->policy_table.usage_and_error_counts; + snapshot_->policy_table.usage_and_error_counts->app_level = + pt_->policy_table.usage_and_error_counts->app_level; + snapshot_->policy_table.usage_and_error_counts->mark_initialized(); + snapshot_->policy_table.usage_and_error_counts->app_level->mark_initialized(); snapshot_->policy_table.device_data = pt_->policy_table.device_data; if (pt_->policy_table.vehicle_data.is_initialized()) { |