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
/
ubus.c
diff --git
a/lua/ubus.c
b/lua/ubus.c
index
899a8bd
..
081ff45
100644
(file)
--- a/
lua/ubus.c
+++ b/
lua/ubus.c
@@
-290,7
+290,11
@@
ubus_method_handler(struct ubus_context *ctx, struct ubus_object *obj,
if (lua_isfunction(state, -1)) {
lua_pushlightuserdata(state, req);
- lua_call(state, 1, 0);
+ if (!msg)
+ lua_pushnil(state);
+ else
+ ubus_lua_parse_blob_array(state, blob_data(msg), blob_len(msg), true);
+ lua_call(state, 2, 0);
}
return 0;
}