diff options
author | AGaliuzov <AGaliuzov@luxoft.com> | 2016-06-15 05:22:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 05:22:13 -0700 |
commit | 3afea4568893ada3fbadabb942b2725e0c46604c (patch) | |
tree | 9b904d6dbf0d3bbcce87f712622a17d013ff2d4b | |
parent | 390a3e445b29bbff0480859e8872350c6f48338a (diff) | |
parent | 59baba3732d3a9464b754ee5a2c8778158d638f8 (diff) | |
download | sdl_core-3afea4568893ada3fbadabb942b2725e0c46604c.tar.gz |
Merge pull request #599 from VProdanov/fix/Core_dump_when_app_is_at_LIMITED_and_stop_connection_or_ignition_off
Fix_core_dump_when_app_is_in_LIMITED_and_ignition_off_is_sent
5 files changed, 9 insertions, 20 deletions
diff --git a/src/components/application_manager/src/resumption/resumption_data_db.cc b/src/components/application_manager/src/resumption/resumption_data_db.cc index 7e025917c4..7e546a012c 100644 --- a/src/components/application_manager/src/resumption/resumption_data_db.cc +++ b/src/components/application_manager/src/resumption/resumption_data_db.cc @@ -48,13 +48,13 @@ #include "utils/file_system.h" #include "application_manager/application_manager_settings.h" -namespace { -const std::string kDatabaseName = "resumption"; -} - namespace resumption { CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption") +namespace { +const char* kDatabaseName = "resumption"; +} // namespace + ResumptionDataDB::ResumptionDataDB( DbStorage db_storage, const application_manager::ApplicationManager& application_manager) diff --git a/src/components/policy/include/policy/sql_pt_representation.h b/src/components/policy/include/policy/sql_pt_representation.h index d8b168e9c9..2710a7d4a5 100644 --- a/src/components/policy/include/policy/sql_pt_representation.h +++ b/src/components/policy/include/policy/sql_pt_representation.h @@ -193,7 +193,6 @@ class SQLPTRepresentation : public virtual PTRepresentation { virtual bool UpdateDBVersion() const OVERRIDE; private: - static const std::string kDatabaseName; utils::dbms::SQLDatabase* db_; #ifdef BUILD_TESTS diff --git a/src/components/policy/src/sql_pt_representation.cc b/src/components/policy/src/sql_pt_representation.cc index 4e47b209e6..046b858131 100644 --- a/src/components/policy/src/sql_pt_representation.cc +++ b/src/components/policy/src/sql_pt_representation.cc @@ -66,10 +66,9 @@ void InsertUnique(K value, T* array) { array->push_back(value); } } +const char* kDatabaseName = "policy"; } // namespace -const std::string SQLPTRepresentation::kDatabaseName = "policy"; - SQLPTRepresentation::SQLPTRepresentation(const std::string& app_storage_folder, uint16_t attempts_to_open_policy_db, uint16_t open_attempt_timeout_ms) diff --git a/src/components/utils/include/utils/sqlite_wrapper/sql_database.h b/src/components/utils/include/utils/sqlite_wrapper/sql_database.h index 437cfd4920..5fd3de5fa1 100644 --- a/src/components/utils/include/utils/sqlite_wrapper/sql_database.h +++ b/src/components/utils/include/utils/sqlite_wrapper/sql_database.h @@ -149,17 +149,6 @@ class SQLDatabase { int error_; /** - * The temporary in-memory database - * @see SQLite manual - */ - static const std::string kInMemory; - - /** - * The extension of filename of database - */ - static const std::string kExtension; - - /** * Execs query for internal using in this class * @param query sql query without return results * @return true if query was executed successfully diff --git a/src/components/utils/src/sqlite_wrapper/sql_database.cc b/src/components/utils/src/sqlite_wrapper/sql_database.cc index 7b7e1f3d5a..4763ddc776 100644 --- a/src/components/utils/src/sqlite_wrapper/sql_database.cc +++ b/src/components/utils/src/sqlite_wrapper/sql_database.cc @@ -36,8 +36,10 @@ namespace utils { namespace dbms { -const std::string SQLDatabase::kInMemory = ":memory:"; -const std::string SQLDatabase::kExtension = ".sqlite"; +namespace { +const char* kInMemory = ":memory:"; +const char* kExtension = ".sqlite"; +} // namespace SQLDatabase::SQLDatabase() : conn_(NULL), database_path_(kInMemory), error_(SQLITE_OK) {} |