summaryrefslogtreecommitdiff
path: root/src/appMain
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/appMain
parent0d9c2776edbb0b50bbf878c563cb80df398986ed (diff)
parente325c8bc87099c5743ac54e22ac0c649991b6b45 (diff)
downloadsdl_core-44263b5e41770bd1f7d156dff71112e02fe68c18.tar.gz
Change policies path and fix params method usage
Diffstat (limited to 'src/appMain')
-rw-r--r--src/appMain/CMakeLists.txt3
-rw-r--r--src/appMain/main.cc13
2 files changed, 13 insertions, 3 deletions
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index a0f053fbd2..1382a07d2f 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -47,7 +47,8 @@ include_directories(
${COMPONENTS_DIR}/smart_objects/include
${COMPONENTS_DIR}/media_manager/include
${COMPONENTS_DIR}/telemetry_monitor/include
- ${COMPONENTS_DIR}/policy/include
+ ${POLICY_PATH}/include/
+ ${POLICY_GLOBAL_INCLUDE_PATH}/
${COMPONENTS_DIR}/resumption/include
${COMPONENTS_DIR}/dbus/include
${CMAKE_BINARY_DIR}/src/components
diff --git a/src/appMain/main.cc b/src/appMain/main.cc
index 9507a52e7b..58ab02b123 100644
--- a/src/appMain/main.cc
+++ b/src/appMain/main.cc
@@ -127,9 +127,9 @@ int32_t main(int32_t argc, char** argv) {
profile::Profile profile_instance;
main_namespace::LifeCycle life_cycle(profile_instance);
if ((argc > 1) && (0 != argv)) {
- profile_instance.config_file_name(argv[1]);
+ profile_instance.set_config_file_name(argv[1]);
} else {
- profile_instance.config_file_name("smartDeviceLink.ini");
+ profile_instance.set_config_file_name("smartDeviceLink.ini");
}
// --------------------------------------------------------------------------
@@ -146,6 +146,15 @@ int32_t main(int32_t argc, char** argv) {
LOG4CXX_INFO(logger_, "Application started!");
LOG4CXX_INFO(logger_, "SDL version: " << profile_instance.sdl_version());
+ // Check if no error values were read from config file
+ if (profile_instance.ErrorOccured()) {
+ const std::string& error = profile_instance.ErrorDescription();
+ LOG4CXX_FATAL(logger_, error);
+ FLUSH_LOGGER();
+ DEINIT_LOGGER();
+ exit(EXIT_FAILURE);
+ }
+
// --------------------------------------------------------------------------
// Components initialization
if (!life_cycle.StartComponents()) {