diff options
Diffstat (limited to 'ctl-lib/ctl-config.c')
-rw-r--r-- | ctl-lib/ctl-config.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c index 339b14c..d1fb4bb 100644 --- a/ctl-lib/ctl-config.c +++ b/ctl-lib/ctl-config.c @@ -232,11 +232,10 @@ json_object* CtlUpdateSectionConfig(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, c int length = (int)json_object_array_length(filesJ); for (int idx=0; idx < length; idx++) { json_object *oneFileJ = json_object_array_get_idx(filesJ, idx); - json_object *responseJ = ScanForConfig(CONTROL_CONFIG_PATH ,CTL_SCAN_RECURSIVE, json_object_get_string(oneFileJ), ".json"); - responseJ = responseJ ? responseJ: + json_object *responseJ = ScanForConfig(bindingPath, CTL_SCAN_RECURSIVE, json_object_get_string(oneFileJ), ".json"); if(!responseJ) { - AFB_ApiError(apiHandle, "No config files found in search path. No changes has been made\n -- %s\n -- %s", CONTROL_CONFIG_PATH, bindingPath); + AFB_ApiError(apiHandle, "No config files found in search path. No changes has been made\n -- %s", bindingPath); return sectionArrayJ; } oneFile = ConfigSearch(apiHandle, responseJ); @@ -251,11 +250,10 @@ json_object* CtlUpdateSectionConfig(AFB_ApiT apiHandle, CtlConfigT *ctlHandle, c } } } else { - json_object *responseJ = ScanForConfig(CONTROL_CONFIG_PATH ,CTL_SCAN_RECURSIVE, json_object_get_string(filesJ), ".json"); - responseJ = responseJ ? responseJ: + json_object *responseJ = ScanForConfig(bindingPath, CTL_SCAN_RECURSIVE, json_object_get_string(filesJ), ".json"); if(!responseJ) { - AFB_ApiError(apiHandle, "No config files found in search path. No changes has been made\n -- %s\n -- %s", CONTROL_CONFIG_PATH, bindingPath); + AFB_ApiError(apiHandle, "No config files found in search path. No changes has been made\n -- %s", bindingPath); return sectionArrayJ; } oneFile = ConfigSearch(apiHandle, responseJ); |