summaryrefslogtreecommitdiff
path: root/src/components/utils
diff options
context:
space:
mode:
authorAlex Kutsan <akutsan@luxoft.com>2017-01-18 09:43:01 +0200
committerAlex Kutsan <akutsan@luxoft.com>2017-01-18 09:43:01 +0200
commit44263b5e41770bd1f7d156dff71112e02fe68c18 (patch)
tree94df1f4c0264d9b69dc002661290f37d9c5accca /src/components/utils
parent0d9c2776edbb0b50bbf878c563cb80df398986ed (diff)
parente325c8bc87099c5743ac54e22ac0c649991b6b45 (diff)
downloadsdl_core-44263b5e41770bd1f7d156dff71112e02fe68c18.tar.gz
Change policies path and fix params method usage
Diffstat (limited to 'src/components/utils')
-rw-r--r--src/components/utils/src/lock_posix.cc2
-rw-r--r--src/components/utils/src/sqlite_wrapper/sql_database.cc3
-rw-r--r--src/components/utils/test/CMakeLists.txt2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/components/utils/src/lock_posix.cc b/src/components/utils/src/lock_posix.cc
index 0a678123f0..9b90ad20b9 100644
--- a/src/components/utils/src/lock_posix.cc
+++ b/src/components/utils/src/lock_posix.cc
@@ -80,7 +80,7 @@ void Lock::Acquire() {
LOG4CXX_FATAL(logger_,
"Failed to acquire mutex " << &mutex_ << ": "
<< strerror(status));
- DCHECK(status != 0);
+ NOTREACHED();
} else {
AssertFreeAndMarkTaken();
}
diff --git a/src/components/utils/src/sqlite_wrapper/sql_database.cc b/src/components/utils/src/sqlite_wrapper/sql_database.cc
index 8c9563ca71..ced9339b23 100644
--- a/src/components/utils/src/sqlite_wrapper/sql_database.cc
+++ b/src/components/utils/src/sqlite_wrapper/sql_database.cc
@@ -54,6 +54,9 @@ bool SQLDatabase::Open() {
if (conn_)
return true;
error_ = sqlite3_open(get_path().c_str(), &conn_);
+ if (error_ != SQLITE_OK) {
+ conn_ = NULL;
+ }
return error_ == SQLITE_OK;
}
diff --git a/src/components/utils/test/CMakeLists.txt b/src/components/utils/test/CMakeLists.txt
index 81e7d15bcb..f6bd24ff09 100644
--- a/src/components/utils/test/CMakeLists.txt
+++ b/src/components/utils/test/CMakeLists.txt
@@ -37,7 +37,7 @@ include_directories (
${COMPONENTS_DIR}/utils/include
${COMPONENTS_DIR}/rpc_base/include
${COMPONENTS_DIR}/utils/test/include
- ${COMPONENTS_DIR}/policy/include
+ ${POLICY_PATH}/include
)
set(EXCLUDE_PATHS