aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctl-lib/ctl-event.c')
-rw-r--r--ctl-lib/ctl-event.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/ctl-lib/ctl-event.c b/ctl-lib/ctl-event.c
index 4174000..bb847b5 100644
--- a/ctl-lib/ctl-event.c
+++ b/ctl-lib/ctl-event.c
@@ -23,7 +23,6 @@
#include "ctl-config.h"
// Event dynamic API-V3 mode
-#if defined AFB_BINDING_PREV3 || AFB_BINDING_VERSION == 3
void CtrlDispatchApiEvent (AFB_ApiT apiHandle, const char *evtLabel, struct json_object *eventJ) {
int idx = 0;
CtlActionT* actions = NULL;
@@ -60,30 +59,6 @@ void CtrlDispatchApiEvent (AFB_ApiT apiHandle, const char *evtLabel, struct json
(void) ActionExecOne (&source, &actions[idx], json_object_get(eventJ));
}
-#else
-// In API-V2 controller config is unique and static
-extern CtlConfigT *ctrlConfig;
-
-// call action attached to even name if any
-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_V2("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
- (void) ActionExecOne (&source, &actions[index], json_object_get(eventJ));
-}
-#endif
-
// onload section receive one action or an array of actions
int EventConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {