projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lua: propagate incoming message to method callback inside the lua context
[project/ubus.git]
/
lua
/
test.lua
diff --git
a/lua/test.lua
b/lua/test.lua
index
d9ecb45
..
07e62c6
100755
(executable)
--- a/
lua/test.lua
+++ b/
lua/test.lua
@@
-20,9
+20,12
@@
local my_method = {
},
test = {
hello = {
},
test = {
hello = {
- function(req)
+ function(req
, msg
)
conn:reply(req, {message="foo"});
print("Call to function 'hello'")
conn:reply(req, {message="foo"});
print("Call to function 'hello'")
+ for k, v in pairs(msg) do
+ print("key=" .. k .. " value=" .. tostring(v))
+ end
end, {id = ubus.INT32, msg = ubus.STRING }
},
hello1 = {
end, {id = ubus.INT32, msg = ubus.STRING }
},
hello1 = {