diff options
author | JackLivio <jack@livio.io> | 2016-04-12 17:23:22 -0400 |
---|---|---|
committer | JackLivio <jack@livio.io> | 2016-04-12 17:23:22 -0400 |
commit | 3b12b47d8c7f6622dacb014f9095b7490a3cba8d (patch) | |
tree | 9598e14606cf1444bae1de2902c75f37239b12d2 | |
parent | e4cd770730b59c2b41572e3bc7f0510394a161d3 (diff) | |
download | sdl_core-hotfix/remove_usage_and_error_count_init_on_save.tar.gz |
Remove mark_initialization() on SaveUsageAndErrorCounts()hotfix/remove_usage_and_error_count_init_on_save
Fixes the issue of Core crashing due to an invalid policy table snapshot generated after a read from preloaded PT on core's initial startup.
-rw-r--r-- | src/components/policy/src/policy/src/sql_pt_representation.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/components/policy/src/policy/src/sql_pt_representation.cc b/src/components/policy/src/policy/src/sql_pt_representation.cc index 47eae02dd7..a0b8ee21ae 100644 --- a/src/components/policy/src/policy/src/sql_pt_representation.cc +++ b/src/components/policy/src/policy/src/sql_pt_representation.cc @@ -1267,7 +1267,6 @@ bool SQLPTRepresentation::SaveDeviceData( bool SQLPTRepresentation::SaveUsageAndErrorCounts( const policy_table::UsageAndErrorCounts& counts) { - const_cast<policy_table::UsageAndErrorCounts&>(counts).mark_initialized(); dbms::SQLQuery query(db()); if (!query.Exec(sql_pt::kDeleteAppLevel)) { LOG4CXX_WARN(logger_, "Incorrect delete from app level."); @@ -1280,7 +1279,6 @@ bool SQLPTRepresentation::SaveUsageAndErrorCounts( policy_table::AppLevels::const_iterator it; const policy_table::AppLevels& app_levels = *counts.app_level; - const_cast<policy_table::AppLevels&>(*counts.app_level).mark_initialized(); for (it = app_levels.begin(); it != app_levels.end(); ++it) { query.Bind(0, it->first); if (!query.Exec()) { |