Diff

plugins/mod_component.lua @ 9562:acf74ad0b795

Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
author Matthew Wild <mwild1@gmail.com>
date Fri, 26 Oct 2018 19:32:00 +0100
parent 8888:cbcac5b9b7ce
child 9784:7fa273f8869e
child 11540:1937b3c3efb5
line wrap: on
line diff
--- a/plugins/mod_component.lua	Fri Oct 26 19:29:08 2018 +0100
+++ b/plugins/mod_component.lua	Fri Oct 26 19:32:00 2018 +0100
@@ -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 @@
 	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