diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2017-10-27 15:14:38 +0200 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2017-10-27 15:18:27 +0200 |
commit | 1676c44575792a53b1a6144059b664590f9dfad7 (patch) | |
tree | 13d4c2eacc4d1ba7c532a468eb801e483eefaf91 /ctl-lib | |
parent | 421ac118bf0dff35533421b8171444d6cf419023 (diff) |
Fix issue with compiling in API-V2
Diffstat (limited to 'ctl-lib')
-rw-r--r-- | ctl-lib/ctl-lua.c | 9 |
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); |