diff options
author | Conlain Kelly <conlain.k@gmail.com> | 2018-08-09 13:31:37 -0400 |
---|---|---|
committer | Conlain Kelly <conlain.k@gmail.com> | 2018-08-09 13:31:37 -0400 |
commit | c55471953afa6642b3cbc017c96570f5c854a61f (patch) | |
tree | 45f36a0e542d0fa3b5f51d5249f5ebe80c561b5a /src/components/policy/policy_regular/src | |
parent | 5644f2bfaabd31861a0a3b454ff8438be3f21d12 (diff) | |
download | sdl_core-c55471953afa6642b3cbc017c96570f5c854a61f.tar.gz |
set full_app_id_supported in initial snapshot generation
Diffstat (limited to 'src/components/policy/policy_regular/src')
-rw-r--r-- | src/components/policy/policy_regular/src/cache_manager.cc | 3 | ||||
-rw-r--r-- | src/components/policy/policy_regular/src/policy_table/types.cc | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index 2ae0f79f75..dace9bbbc7 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -824,6 +824,9 @@ void CacheManager::CheckSnapshotInitialization() { } *(snapshot_->policy_table.module_config.preloaded_pt) = false; + + *(snapshot_->policy_table.module_config.full_app_id_supported) = settings_->use_full_app_id(); + // SDL must not send certificate in snapshot snapshot_->policy_table.module_config.certificate = diff --git a/src/components/policy/policy_regular/src/policy_table/types.cc b/src/components/policy/policy_regular/src/policy_table/types.cc index c983e4f12b..6e692ce7cb 100644 --- a/src/components/policy/policy_regular/src/policy_table/types.cc +++ b/src/components/policy/policy_regular/src/policy_table/types.cc @@ -455,6 +455,7 @@ ModuleConfig::ModuleConfig(const Json::Value* value__) : CompositeType(InitHelper(value__, &Json::Value::isObject)) , device_certificates(impl::ValueMember(value__, "device_certificates")) , preloaded_pt(impl::ValueMember(value__, "preloaded_pt")) + , full_app_id_supported(impl::ValueMember(value__, "full_app_id_supported")) , exchange_after_x_ignition_cycles( impl::ValueMember(value__, "exchange_after_x_ignition_cycles")) , exchange_after_x_kilometers( @@ -494,6 +495,7 @@ void ModuleConfig::SafeCopyFrom(const ModuleConfig& from) { Json::Value ModuleConfig::ToJsonValue() const { Json::Value result__(Json::objectValue); impl::WriteJsonField("preloaded_pt", preloaded_pt, &result__); + impl::WriteJsonField("full_app_id_supported", full_app_id_supported, &result__); impl::WriteJsonField("exchange_after_x_ignition_cycles", exchange_after_x_ignition_cycles, &result__); @@ -521,6 +523,9 @@ bool ModuleConfig::is_valid() const { if (!preloaded_pt.is_valid()) { return false; } + if (!full_app_id_supported.is_valid()) { + return false; + } if (!exchange_after_x_ignition_cycles.is_valid()) { return false; } @@ -567,6 +572,9 @@ bool ModuleConfig::is_initialized() const { bool ModuleConfig::struct_empty() const { if (preloaded_pt.is_initialized()) { return false; + } + if (full_app_id_supported.is_initialized()) { + return false; } if (exchange_after_x_ignition_cycles.is_initialized()) { @@ -617,6 +625,9 @@ void ModuleConfig::ReportErrors(rpc::ValidationReport* report__) const { if (!preloaded_pt.is_valid()) { preloaded_pt.ReportErrors(&report__->ReportSubobject("preloaded_pt")); } + if (!full_app_id_supported.is_valid()) { + full_app_id_supported.ReportErrors(&report__->ReportSubobject("full_app_id_supported")); + } if (!exchange_after_x_ignition_cycles.is_valid()) { exchange_after_x_ignition_cycles.ReportErrors( &report__->ReportSubobject("exchange_after_x_ignition_cycles")); @@ -675,6 +686,7 @@ void ModuleConfig::ReportErrors(rpc::ValidationReport* report__) const { void ModuleConfig::SetPolicyTableType(PolicyTableType pt_type) { CompositeType::SetPolicyTableType(pt_type); preloaded_pt.SetPolicyTableType(pt_type); + full_app_id_supported.SetPolicyTableType(pt_type); exchange_after_x_ignition_cycles.SetPolicyTableType(pt_type); exchange_after_x_kilometers.SetPolicyTableType(pt_type); exchange_after_x_days.SetPolicyTableType(pt_type); |