aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctl-lib/ctl-lua.c9
1 files changed, 8 insertions, 1 deletions
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);