From 1676c44575792a53b1a6144059b664590f9dfad7 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Fri, 27 Oct 2017 15:14:38 +0200 Subject: Fix issue with compiling in API-V2 --- ctl-lib/ctl-lua.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ctl-lib') diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c index 4d32794..cd5d292 100644 --- a/ctl-lib/ctl-lua.c +++ b/ctl-lib/ctl-lua.c @@ -416,7 +416,11 @@ STATIC int LuaAfbFail(lua_State* luaState) { return 1; } +#ifdef AFB_BINDING_PREV3 STATIC void LuaAfbServiceCB(void *handle, int iserror, struct json_object *responseJ, AFB_ApiT apiHandle) { +#else +STATIC void LuaAfbServiceCB(void *handle, int iserror, struct json_object *responseJ) { +#endif LuaCbHandleT *handleCb= (LuaCbHandleT*)handle; int count=1; @@ -914,8 +918,11 @@ STATIC int LuaTimerClear (lua_State* luaState) { // retrieve useful information opaque handle TimerHandleT *timerHandle = LuaTimerPop(luaState, LUA_FIST_ARG); if (!timerHandle) goto OnErrorExit; + +#ifdef AFB_BINDING_PREV3 + // API handle does not exit in API-V2 LuaCbHandleT *luaCbHandle = (LuaCbHandleT*) timerHandle->context; - +#endif AFB_ApiNotice (luaCbHandle->source->api,"LuaTimerClear timer=%s", timerHandle->uid); TimerEvtStop(timerHandle); -- cgit 1.2.3-korg