diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2017-11-05 13:01:07 +0100 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2017-11-05 13:01:07 +0100 |
commit | 2e2cf0b8f97c8a72255ab0b977f94bd6c684b203 (patch) | |
tree | 79300297cb13c7be472663841be1ffd9e8177e04 /ahl-binding/ahl-config.c | |
parent | 68f1187061c28ecf6439b4dd465f4d256529dc55 (diff) |
Added few protection again invalid config
Diffstat (limited to 'ahl-binding/ahl-config.c')
-rw-r--r-- | ahl-binding/ahl-config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ahl-binding/ahl-config.c b/ahl-binding/ahl-config.c index c0854a8..0817c25 100644 --- a/ahl-binding/ahl-config.c +++ b/ahl-binding/ahl-config.c @@ -46,7 +46,7 @@ static json_object* CtlConfigScan(const char *dirList, const char *prefix) { strncat(controlFile, GetBinderName(), CONTROL_MAXPATH_LEN); // search for default dispatch config file - json_object* responseJ = ScanForConfig(dirList, CTL_SCAN_RECURSIVE, controlFile, ".json"); + json_object* responseJ = ScanForConfig(dirList, CTL_SCAN_RECURSIVE, controlFile, "-config.json"); return responseJ; } @@ -94,10 +94,10 @@ int ParseHLBConfig() { const char *configfile_path =CtlConfigSearch(dirList, "ahl-"); if (!configfile_path) { AFB_ERROR("Error: No control-* config found invalid JSON %s ", dirList); - return 1; + return AHL_FAIL; } - AFB_INFO("High-level config file -> %s\n", configfile_path); + AFB_NOTICE("High-level config file -> %s\n", configfile_path); // Open configuration file json_object *config_JFile=json_object_from_file(configfile_path); |