From e532f01fc3028ee8d766a692651243661b2769f8 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 25 Oct 2017 19:10:56 +0200 Subject: Formating Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot --- ctl-lib/ctl-event.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'ctl-lib/ctl-event.c') diff --git a/ctl-lib/ctl-event.c b/ctl-lib/ctl-event.c index 62632e6..5be8b24 100644 --- a/ctl-lib/ctl-event.c +++ b/ctl-lib/ctl-event.c @@ -27,27 +27,27 @@ #ifdef AFB_BINDING_PREV3 PUBLIC void CtrlDispatchApiEvent (AFB_ApiT apiHandle, const char *evtLabel, struct json_object *eventJ) { AFB_ApiNotice (apiHandle, "Received event=%s, query=%s", evtLabel, json_object_get_string(eventJ)); - + // retrieve section config from api handle CtlConfigT *ctrlConfig = (CtlConfigT*) afb_dynapi_get_userdata(apiHandle); - + CtlActionT* actions = ctrlConfig->sections[CTL_SECTION_EVENT].actions; - + int index= ActionLabelToIndex(actions, evtLabel); if (index < 0) { AFB_ApiWarning(apiHandle, "CtlDispatchEvent: fail to find uid=%s in action event section", evtLabel); return; } - // create a dummy source for action + // create a dummy source for action CtlSourceT source; source.uid = actions[index].uid; source.api = actions[index].api; source.request = NULL; - - // Best effort ignoring error to exec corresponding action + + // Best effort ignoring error to exec corresponding action (void) ActionExecOne (&source, &actions[index], eventJ); - + } #else // In API-V2 controller config is unique and static @@ -56,34 +56,34 @@ extern CtlConfigT *ctrlConfig; // call action attached to even name if any PUBLIC void CtrlDispatchV2Event(const char *evtLabel, json_object *eventJ) { CtlActionT* actions = ctrlConfig->sections[CTL_SECTION_EVENT].actions; - + int index= ActionLabelToIndex(actions, evtLabel); if (index < 0) { AFB_WARNING ("CtlDispatchEvent: fail to find uid=%s in action event section", evtLabel); return; } - + CtlSourceT source; source.uid = actions[index].uid; source.api = actions[index].api; source.request = AFB_ReqNone; - // Best effort ignoring error to exec corresponding action + // Best effort ignoring error to exec corresponding action (void) ActionExecOne (&source, &actions[index], eventJ); } #endif // onload section receive one action or an array of actions PUBLIC int EventConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) { - + // Load time parse actions in config file if (actionsJ != NULL) { section->actions= ActionConfig(apiHandle, actionsJ, 0); - + if (!section->actions) { AFB_ApiError (apiHandle, "EventLoad config fail processing onload actions"); goto OnErrorExit; - } + } } return 0; -- cgit 1.2.3-korg