summaryrefslogtreecommitdiffstats
path: root/conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-12-13 10:19:36 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 13:10:35 +0100
commit9a2be611dfb8fe4d542a67b204e5c61d96db911b (patch)
treef524d9d5562954bf465be4fc00724093e9d91e50 /conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua
parent005cb9eed05cd5a6ddfad13e45c6807263408dab (diff)
Fixing afb function call from LUA and cleaning
Change-Id: I36d675ba7c38ce883a021da1a82dfbe8b077a39f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua')
-rw-r--r--conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua b/conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua
index 71df908..581343e 100644
--- a/conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua
+++ b/conf.d/project/lua.d/signal-composer-daemon-04-oncall.lua
@@ -74,7 +74,7 @@ end
-- Display receive arguments and echo them to caller
function _Simple_Echo_Args (source, args, event)
_count=_count+1
- AFB:notice("LUA OnCall Echo Args count=%d args=%s event=%s", count, args, event)
+ AFB:notice(source, "LUA OnCall Echo Args count=%d args=%s event=%s", count, args, event)
print ("--inlua-- source=", Dump_Table(source))
print ("--inlua-- args=", Dump_Table(args))
@@ -95,7 +95,7 @@ local function Test_Async_CB (request, result, context)
["context"]=context,
}
- AFB:notice ("Test_Async_CB result=%s context=%s", result, context)
+ AFB:notice (source, "Test_Async_CB result=%s context=%s", result, context)
AFB:success (request, response)
end
@@ -105,18 +105,18 @@ function _Test_Call_Async (request, args)
["value2"]=1234
}
- AFB:notice ("Test_Call_Async args=%s cb=Test_Async_CB", args)
- AFB:service("monitor","ping", "Test_Async_CB", context)
+ AFB:notice (source, "Test_Call_Async args=%s cb=Test_Async_CB", args)
+ AFB:service(source, "monitor","ping", "Test_Async_CB", context)
end
function _Simple_Monitor_Call (request, args)
- AFB:notice ("_Simple_Server_Call args=%s", args)
- local err, result= AFB:servsync ("monitor","get", args)
+ AFB:notice (source, "_Simple_Server_Call args=%s", args)
+ local err, result= AFB:servsync (source, "monitor","get", args)
if (err) then
- AFB:fail ("AFB:service_call_sync fail");
+ AFB:fail (source, "AFB:service_call_sync fail");
else
- AFB:success (request, result["response"])
+ AFB:success(source, request, result["response"])
end
end