summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-onload.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-12-13 14:42:49 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-17 10:04:07 +0100
commiteaf644db7106061481710adb75023122ce4bc150 (patch)
tree9b06621a42861997b96a6f0921a0b33dc685d654 /ctl-lib/ctl-onload.c
parenteaf8c0808d54d987a532254887919822438b7848 (diff)
Shared library: update to a v3 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 - use of the GNUinstalldirs module to set the destination directories. Change-Id: Ifdf12885ffad5003ecbbcf3639af63060f0ebc7e Signed-off-by: Clément Bénier <clement.benier@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-onload.c')
-rw-r--r--ctl-lib/ctl-onload.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ctl-lib/ctl-onload.c b/ctl-lib/ctl-onload.c
index 6100f2a..c631e4c 100644
--- a/ctl-lib/ctl-onload.c
+++ b/ctl-lib/ctl-onload.c
@@ -23,19 +23,19 @@
#include "ctl-config.h"
// onload section receive one action or an array of actions
-int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {
+int OnloadConfig(afb_api_t apiHandle, CtlSectionT *section, json_object *actionsJ) {
int err = 0;
// Load time parse actions in control file
if (actionsJ != NULL) {
if ( (err= AddActionsToSection(apiHandle, section, actionsJ, 0)) ) {
- AFB_ApiError (apiHandle, "OnloadConfig control fail processing actions for section %s", section->uid);
+ AFB_API_ERROR (apiHandle, "OnloadConfig control fail processing actions for section %s", section->uid);
return err;
}
} else {
// Exec time process onload action now
if (!section->actions) {
- AFB_ApiWarning (apiHandle, "OnloadConfig Cannot Exec Non Existing Onload Action");
+ AFB_API_WARNING (apiHandle, "OnloadConfig Cannot Exec Non Existing Onload Action");
return 1;
}
@@ -43,12 +43,12 @@ int OnloadConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ
CtlSourceT source;
source.uid = section->actions[idx].uid;
source.api = section->actions[idx].api;
- source.request = AFB_ReqNone;
+ source.request = NULL;
if(!err)
err = ActionExecOne(&source, &section->actions[idx], NULL);
else {
- AFB_ApiError(apiHandle, "Onload action execution failed on: %s", source.uid);
+ AFB_API_ERROR(apiHandle, "Onload action execution failed on: %s", source.uid);
return err;
}
}