diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-10-25 19:10:56 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-12-13 15:02:54 +0100 |
commit | af1069d393d97857a2fd6e5ac6eb55dae1af4716 (patch) | |
tree | 140d833a1a7f3eb3ed31c9be0e1327d26ff66c3f /ctl-lib/ctl-config.c | |
parent | 6d70dd06ac391b2bcae106121d0ca350eba3d1c4 (diff) |
Formating
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-config.c')
-rw-r--r-- | ctl-lib/ctl-config.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c index 9b04df6..42d2897 100644 --- a/ctl-lib/ctl-config.c +++ b/ctl-lib/ctl-config.c @@ -39,7 +39,7 @@ PUBLIC int CtlConfigMagicNew() { gettimeofday(&tv,NULL); srand ((int)tv.tv_usec); } - + return ((long)rand()); } @@ -56,7 +56,7 @@ PUBLIC json_object* CtlConfigScan(const char *dirList, const char *prefix) { PUBLIC char* CtlConfigSearch(AFB_ApiT apiHandle, const char *dirList, const char *prefix) { int index, err; - + // search for default dispatch config file json_object* responseJ = CtlConfigScan (dirList, prefix); @@ -86,7 +86,7 @@ PUBLIC char* CtlConfigSearch(AFB_ApiT apiHandle, const char *dirList, const char } PUBLIC int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig) { - + // best effort to initialise everything before starting if (ctlConfig->requireJ) { @@ -115,12 +115,12 @@ PUBLIC int CtlConfigExec(AFB_ApiT apiHandle, CtlConfigT *ctlConfig) { // Loop on every section and process config int errcount=0; for (int idx = 0; ctlConfig->sections[idx].key != NULL; idx++) { - + if (!ctlConfig->sections[idx].actions) { AFB_ApiNotice(apiHandle, "CtlConfigLoad: notice empty section '%s'", ctlConfig->sections[idx].key); continue; } - + errcount += ctlConfig->sections[idx].loadCB(apiHandle, &ctlConfig->sections[idx], NULL); } return errcount; @@ -154,10 +154,10 @@ PUBLIC CtlConfigT *CtlLoadMetaData(AFB_ApiT apiHandle, const char* filepath) { goto OnErrorExit; } } - - ctlHandle->configJ = ctlConfigJ; + + ctlHandle->configJ = ctlConfigJ; return ctlHandle; - + OnErrorExit: if (ctlHandle) free(ctlHandle); return NULL; |