X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=lua%2Fubus.c;fp=lua%2Fubus.c;h=081ff45b53f6482657d5922a8bc130f4b294198f;hb=0f793d3a457af9afa8bc4eae2dff855cd7e6a192;hp=899a8bd3dcadc9ace66e8e5683cad1833b60855c;hpb=1e3220d9df655c2b2ed935e128933dbf9507c9fa;p=project%2Fubus.git diff --git a/lua/ubus.c b/lua/ubus.c index 899a8bd..081ff45 100644 --- 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; }