diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2017-08-18 01:09:56 +0200 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2017-08-18 01:09:56 +0200 |
commit | a7d41a6fa1e29d800ce8ac9e95e8f943814463e8 (patch) | |
tree | 30ca09383f1ce30df559601328e1714f67afc8fc /conf.d/project/lua.d/onload-audio-oncall.lua | |
parent | 5e919fde0a4c66b0203c46b8f06f303fcceaedde (diff) |
Integration with Alsa HookPlugin is now working.
Diffstat (limited to 'conf.d/project/lua.d/onload-audio-oncall.lua')
-rw-r--r-- | conf.d/project/lua.d/onload-audio-oncall.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/conf.d/project/lua.d/onload-audio-oncall.lua b/conf.d/project/lua.d/onload-audio-oncall.lua index 08b25e5..23b538e 100644 --- a/conf.d/project/lua.d/onload-audio-oncall.lua +++ b/conf.d/project/lua.d/onload-audio-oncall.lua @@ -18,18 +18,18 @@ Provide sample LUA routines to be used with AGL control "lua_docall" API --]] --- global counter to keep track of calls -count=0 +--global counter to keep track of calls +_count=0 -- Display receive arguments and echo them to caller -function Simple_Echo_Args (request, args) - count=count+1 +function _Simple_Echo_Args (request, args) + _count=_count+1 AFB:notice("LUA OnCall Echo Args count=%d args=%s", count, args) print ("--inlua-- args=", Dump_Table(args)) local response={ - ["count"]=count, + ["count"]=_count, ["args"]=args, } @@ -37,7 +37,7 @@ function Simple_Echo_Args (request, args) AFB:success (request, {["func"]="Simple_Echo_Args", ["ret1"]=5678, ["ret2"]="abcd"}) end -function Test_Async_CB (request, result, context) +local function Test_Async_CB (request, result, context) response={ ["result"]=result, ["context"]=context, @@ -47,7 +47,7 @@ function Test_Async_CB (request, result, context) AFB:success (request, response) end -function Test_Call_Async (request, args) +function _Test_Call_Async (request, args) local context={ ["value1"]="abcd", ["value2"]=1234 @@ -57,7 +57,7 @@ function Test_Call_Async (request, args) AFB:service("alsacore","ping", "Test_Async_CB", context) end -function Test_Call_Sync (request, args) +function _Test_Call_Sync (request, args) AFB:notice ("Test_Call_Sync args=%s", args) local err, response= AFB:service_sync ("alsacore","ping", args) |