summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-config.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-12-03 19:15:51 +0100
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-12-04 15:09:24 +0100
commit1bef31c8bbad27f4914484c5007b2e199fb073d4 (patch)
tree16c8998139ad5a1988bfc934d8443121c2f509f8 /ctl-lib/ctl-config.c
parent2a588b74822cf093198bdbc01fb0f2d57a3f3fec (diff)
As it is not used anymore (was only used to search for an environment variable containing plugin search paths list), remove use of prefix in libappcontroller. BUG-AGL: SPEC3011 Change-Id: I7885462d56761ad39771360e1b6b1c2b10bbe8c9 Signed-off-by: Jonathan Aillet <jonathan.aillet@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 e6a16b9..6b8b9be 100644
--- a/ctl-lib/ctl-config.c
+++ b/ctl-lib/ctl-config.c
@@ -173,7 +173,7 @@ int CtlConfigExec(afb_api_t apiHandle, CtlConfigT *ctlConfig) {
return 0;
}
-CtlConfigT *CtlLoadMetaDataJson(afb_api_t apiHandle, json_object *ctlConfigJ, const char *prefix) {
+CtlConfigT *CtlLoadMetaDataJson(afb_api_t apiHandle, json_object *ctlConfigJ) {
json_object *metadataJ;
CtlConfigT *ctlHandle=NULL;
@@ -193,13 +193,12 @@ CtlConfigT *CtlLoadMetaDataJson(afb_api_t apiHandle, json_object *ctlConfigJ, co
return NULL;
}
ctlHandle->configJ = ctlConfigJ;
- ctlHandle->prefix = prefix;
}
return ctlHandle;
}
-CtlConfigT *CtlLoadMetaDataUsingPrefix(afb_api_t apiHandle,const char* filepath, const char *prefix) {
+CtlConfigT *CtlLoadMetaData(afb_api_t apiHandle,const char* filepath) {
json_object *ctlConfigJ;
@@ -212,7 +211,7 @@ CtlConfigT *CtlLoadMetaDataUsingPrefix(afb_api_t apiHandle,const char* filepath,
AFB_API_INFO(apiHandle, "CTL-LOAD-CONFIG: loading config filepath=%s", filepath);
- return CtlLoadMetaDataJson(apiHandle, ctlConfigJ, prefix);
+ return CtlLoadMetaDataJson(apiHandle, ctlConfigJ);
}
void wrap_json_array_add(void* array, json_object *val) {
@@ -317,7 +316,7 @@ int CtlLoadSections(afb_api_t apiHandle, CtlConfigT *ctlHandle, CtlSectionT *sec
int error;
#ifdef CONTROL_SUPPORT_LUA
- if (LuaConfigLoad(apiHandle, ctlHandle->prefix))
+ if (LuaConfigLoad(apiHandle))
return -1;
#endif
@@ -325,7 +324,6 @@ int CtlLoadSections(afb_api_t apiHandle, CtlConfigT *ctlHandle, CtlSectionT *sec
for (int idx = 0; sections[idx].key != NULL; idx++) {
json_object * sectionJ;
if (json_object_object_get_ex(ctlHandle->configJ, sections[idx].key, &sectionJ)) {
- sections[idx].prefix = ctlHandle->prefix;
json_object* updatedSectionJ = LoadAdditionalsFiles(apiHandle, ctlHandle, sections[idx].key, sectionJ);
if (!sections[idx].loadCB) {