From c33c8c220fae362a86d747bb5d91d02a9116d2c5 Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Tue, 4 Sep 2018 10:20:18 +0200 Subject: controller: compatibility with v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build it with AFB_BINDING_VERSION=0 Signed-off-by: Clément Bénier --- ctl-lib/ctl-plugin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ctl-lib/ctl-plugin.c') diff --git a/ctl-lib/ctl-plugin.c b/ctl-lib/ctl-plugin.c index e57fb8a..71931b8 100644 --- a/ctl-lib/ctl-plugin.c +++ b/ctl-lib/ctl-plugin.c @@ -24,7 +24,7 @@ #include "ctl-config.h" -int PluginGetCB (AFB_ApiT apiHandle, CtlActionT *action , json_object *callbackJ) { +int PluginGetCB_V3(AFB_ApiT apiHandle, CtlActionT *action , json_object *callbackJ) { const char *plugin=NULL, *function=NULL; json_object *argsJ; int idx; @@ -94,11 +94,9 @@ static int PluginLoadCOne(AFB_ApiT apiHandle, const char *pluginpath, json_objec // store dlopen handle to enable onload action at exec time ctlPlugin->dlHandle = dlHandle; -#if (defined(AFB_BINDING_PREV3) || (AFB_BINDING_VERSION == 3)) // Jose hack to make verbosity visible from sharelib with API-V2 struct afb_binding_data_v2 *afbHidenData = dlsym(dlHandle, "afbBindingV2data"); if (afbHidenData) *afbHidenData = afbBindingV2data; -#endif // Push lua2cWrapper @ into plugin Lua2cWrapperT *lua2cInPlug = dlsym(dlHandle, "Lua2cWrap"); @@ -401,7 +399,7 @@ static int PluginParse(AFB_ApiT apiHandle, CtlSectionT *section, json_object *pl return err; } -int PluginConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *pluginsJ) { +int PluginConfig_V3(AFB_ApiT apiHandle, CtlSectionT *section, json_object *pluginsJ) { int err = 0; int idx = 0, jdx = 0; int pluginNb = 0, newPluginsNb = 0, totalPluginNb = 0; -- cgit