Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
9561:cfc7b2f7251e | 9562:acf74ad0b795 |
---|---|
7 -- | 7 -- |
8 | 8 |
9 module:set_global(); | 9 module:set_global(); |
10 | 10 |
11 local t_concat = table.concat; | 11 local t_concat = table.concat; |
12 local xpcall, tostring, type = xpcall, tostring, type; | 12 local tostring, type = tostring, type; |
13 local xpcall = require "util.xpcall".xpcall; | |
13 local traceback = debug.traceback; | 14 local traceback = debug.traceback; |
14 | 15 |
15 local logger = require "util.logger"; | 16 local logger = require "util.logger"; |
16 local sha1 = require "util.hashes".sha1; | 17 local sha1 = require "util.hashes".sha1; |
17 local st = require "util.stanza"; | 18 local st = require "util.stanza"; |
236 return; | 237 return; |
237 end | 238 end |
238 end | 239 end |
239 | 240 |
240 if stanza then | 241 if stanza then |
241 return xpcall(function () return core_process_stanza(session, stanza) end, handleerr); | 242 return xpcall(core_process_stanza, handleerr, session, stanza); |
242 end | 243 end |
243 end | 244 end |
244 | 245 |
245 --- Closing a component connection | 246 --- Closing a component connection |
246 local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; | 247 local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; |