diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-12 00:29:28 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-14 11:00:25 +0100 |
commit | d663f702c0e4fa562783504a483dce8f362d628e (patch) | |
tree | fdb656d0467a935aa6790dd9e05d3e373606a3e1 /controller/ctl-action.c | |
parent | 75cfbf3d0206f12422091e6479c508c69445bf4a (diff) |
Progression on config parsing.
Change-Id: Idd8d8987ccabef381f6d79c1d508930a2d4bae3c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-action.c')
-rw-r--r-- | controller/ctl-action.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/controller/ctl-action.c b/controller/ctl-action.c index b24269c..5da24e8 100644 --- a/controller/ctl-action.c +++ b/controller/ctl-action.c @@ -25,7 +25,7 @@ #include "ctl-config.h" -PUBLIC int ActionExecOne(CtlActionT* action, json_object *queryJ) { +int ActionExecOne(CtlActionT* action, json_object *queryJ) { int err; @@ -50,7 +50,7 @@ PUBLIC int ActionExecOne(CtlActionT* action, json_object *queryJ) { json_object_object_add(queryJ, "args", action->argsJ); } } - + json_object_object_add(queryJ, "label", json_object_new_string(action->source.label)); int err = afb_service_call_sync(action->api, action->call, queryJ, &returnJ); @@ -96,7 +96,7 @@ OnErrorExit: // unpack individual action object -PUBLIC int ActionLoadOne(CtlActionT *action, json_object *actionJ) { +int ActionLoadOne(CtlActionT *action, json_object *actionJ) { char *api = NULL, *verb = NULL, *lua = NULL; int err, modeCount = 0; json_object *callbackJ=NULL; @@ -123,10 +123,10 @@ PUBLIC int ActionLoadOne(CtlActionT *action, json_object *actionJ) { if (callbackJ) { action->type = CTL_TYPE_CB; - modeCount++; + modeCount++; err = PluginGetCB (action, callbackJ); if (err) goto OnErrorExit; - + } // make sure at least one mode is selected @@ -145,7 +145,7 @@ OnErrorExit: return 1; }; -PUBLIC CtlActionT *ActionLoad(json_object *actionsJ) { +CtlActionT *ActionLoad(json_object *actionsJ) { int err; CtlActionT *actions; |