aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_component.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-26 19:32:00 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-26 19:32:00 +0100
commitb8ce51ee351162fea402999df59e576c62776953 (patch)
tree0eff02506e6364d1dcb5c71b2edaacd6662ffe20 /plugins/mod_component.lua
parentf05e8649eddd2180e39ebe9482fee29bf7652c97 (diff)
downloadprosody-b8ce51ee351162fea402999df59e576c62776953.tar.gz
prosody-b8ce51ee351162fea402999df59e576c62776953.zip
Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
Diffstat (limited to 'plugins/mod_component.lua')
-rw-r--r--plugins/mod_component.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 743a16a3..b41204a2 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -9,7 +9,8 @@
module:set_global();
local t_concat = table.concat;
-local xpcall, tostring, type = xpcall, tostring, type;
+local tostring, type = tostring, type;
+local xpcall = require "util.xpcall".xpcall;
local traceback = debug.traceback;
local logger = require "util.logger";
@@ -238,7 +239,7 @@ function stream_callbacks.handlestanza(session, stanza)
end
if stanza then
- return xpcall(function () return core_process_stanza(session, stanza) end, handleerr);
+ return xpcall(core_process_stanza, handleerr, session, stanza);
end
end