diff options
Diffstat (limited to 'modules/rpc/luasrc/jsonrpc.lua')
-rw-r--r-- | modules/rpc/luasrc/jsonrpc.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/rpc/luasrc/jsonrpc.lua b/modules/rpc/luasrc/jsonrpc.lua index 1c0db8bcef..71c95d549b 100644 --- a/modules/rpc/luasrc/jsonrpc.lua +++ b/modules/rpc/luasrc/jsonrpc.lua @@ -44,9 +44,10 @@ function handle(tbl, rawsource, ...) if stat then if type(json.method) == "string" and (not json.params or type(json.params) == "table") then - if tbl[json.method] then + local method = resolve(tbl, json.method) + if method then response = reply(json.jsonrpc, json.id, - proxy(resolve(tbl, json.method), unpack(json.params or {}))) + proxy(method, unpack(json.params or {}))) else response = reply(json.jsonrpc, json.id, nil, {code=-32601, message="Method not found."}) @@ -90,4 +91,4 @@ function proxy(method, ...) return res end end -end
\ No newline at end of file +end |