aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.c
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-08-30 11:03:22 +0200
committerClément Bénier <clement.benier@iot.bzh>2018-10-05 14:38:35 +0200
commit1f55a87db34f67504e55e80137b309f215d93cdc (patch)
tree012e674f433a12dc2e21d9186f335b8234b44599 /ctl-lib/ctl-config.c
parent1d757228d9acb1d09ce966fe68b87fc067b9d9af (diff)
shared library: update to a v3 shared librarysandbox/benierc/shared-library
- AFB_BINDING_VERSION = 3 - remove preprocessor variables - mandatory lua - name of library is ctl-utilities - does not work with v2 versions - remove afb-definitions.h Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-config.c')
-rw-r--r--ctl-lib/ctl-config.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c
index 6d46130..42391db 100644
--- a/ctl-lib/ctl-config.c
+++ b/ctl-lib/ctl-config.c
@@ -233,11 +233,10 @@ json_object* CtlUpdateSectionConfig(afb_api_t apiHandle, CtlConfigT *ctlHandle,
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_API_ERROR(apiHandle, "No config files found in search path. No changes has been made\n -- %s\n -- %s", CONTROL_CONFIG_PATH, bindingPath);
+ AFB_API_ERROR(apiHandle, "No config files found in search path. No changes has been made\n -- %s", bindingPath);
return sectionArrayJ;
}
oneFile = ConfigSearch(apiHandle, responseJ);
@@ -252,11 +251,10 @@ json_object* CtlUpdateSectionConfig(afb_api_t apiHandle, CtlConfigT *ctlHandle,
}
}
} 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_API_ERROR(apiHandle, "No config files found in search path. No changes has been made\n -- %s\n -- %s", CONTROL_CONFIG_PATH, bindingPath);
+ AFB_API_ERROR(apiHandle, "No config files found in search path. No changes has been made\n -- %s", bindingPath);
return sectionArrayJ;
}
oneFile = ConfigSearch(apiHandle, responseJ);