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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ctl-lib/ctl-event.c b/ctl-lib/ctl-event.c
index bb847b5..6042d21 100644
--- a/ctl-lib/ctl-event.c
+++ b/ctl-lib/ctl-event.c
@@ -29,11 +29,7 @@ void CtrlDispatchApiEvent (AFB_ApiT apiHandle, const char *evtLabel, struct json
AFB_ApiDebug (apiHandle, "Received event=%s, query=%s", evtLabel, json_object_get_string(eventJ));
// retrieve section config from api handle
- #ifdef AFB_BINDING_PREV3
- CtlConfigT *ctrlConfig = (CtlConfigT*) afb_dynapi_get_userdata(apiHandle);
- #elif AFB_BINDING_VERSION == 3
- CtlConfigT *ctrlConfig = (CtlConfigT*) afb_api_get_userdata(apiHandle);
- #endif
+ CtlConfigT *ctrlConfig = (CtlConfigT*) AFB_ApiGetUserData(apiHandle);
for (idx = 0; ctrlConfig->sections[idx].key != NULL; ++idx)
{
@@ -60,7 +56,7 @@ void CtrlDispatchApiEvent (AFB_ApiT apiHandle, const char *evtLabel, struct json
}
// onload section receive one action or an array of actions
-int EventConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {
+int EventConfig_V3(AFB_ApiT apiHandle, CtlSectionT *section, json_object *actionsJ) {
// Load time parse actions in config file
if (actionsJ != NULL) {