projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ubus/lua: pass notification name to callback
[project/ubus.git]
/
lua
/
ubus.c
diff --git
a/lua/ubus.c
b/lua/ubus.c
index
cfe9c9b
..
00d9e00
100644
(file)
--- a/
lua/ubus.c
+++ b/
lua/ubus.c
@@
-787,10
+787,11
@@
ubus_sub_notify_handler(struct ubus_context *ctx, struct ubus_object *obj,
if (lua_isfunction(state, -1)) {
if( msg ){
ubus_lua_parse_blob_array(state, blob_data(msg), blob_len(msg), true);
if (lua_isfunction(state, -1)) {
if( msg ){
ubus_lua_parse_blob_array(state, blob_data(msg), blob_len(msg), true);
- lua_call(state, 1, 0);
} else {
} else {
- lua_
call(state, 0, 0
);
+ lua_
pushnil(state
);
}
}
+ lua_pushstring(state, method);
+ lua_call(state, 2, 0);
} else {
lua_pop(state, 1);
}
} else {
lua_pop(state, 1);
}