From b24b2efe274e7cf49cd0952f1bc0f740c5dc9bb7 Mon Sep 17 00:00:00 2001 From: Akio Fukubayashi Date: Tue, 3 Sep 2019 09:45:11 +0900 Subject: Fix place of connection.json Signed-off-by: Akio Fukubayashi --- src/wm_connection.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/wm_connection.cpp') diff --git a/src/wm_connection.cpp b/src/wm_connection.cpp index 3600cd4..b7b6a0f 100644 --- a/src/wm_connection.cpp +++ b/src/wm_connection.cpp @@ -41,7 +41,7 @@ namespace wm namespace { -static const char kPathConnectionConfigFile[] = "/etc/hmi-config/connection.json"; +static const char kPathConnectionConfigFile[] = "/etc/connection.json"; static const char kPathTimeoutConfigFile[] = "/etc/timeout.json"; static const char kDefaultIpAddr[] = "192.168.10.10"; static const int kDefaultPort = 4000; @@ -791,7 +791,13 @@ int WMConnection::loadTimeoutConfigFile() int WMConnection::loadConnectionConfigFile() { - std::string path = std::string(kPathConnectionConfigFile); + // Get afm application installed dir + char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR"); + if (!afm_app_install_dir) + { + HMI_ERROR("AFM_APP_INSTALL_DIR is not defined"); + } + std::string path = std::string(afm_app_install_dir) + std::string(kPathConnectionConfigFile); // Load connection config file json_object *json_obj, *json_cfg; -- cgit 1.2.3-korg