Mercurial > prosody-hg
comparison net/xmppserver_listener.lua @ 551:53dc98ffde16
Automated merge with http://waqas.ath.cx/
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 04 Dec 2008 19:21:50 +0000 |
| parents | 60002993be04 |
| children | c9b3ffb08fe3 |
comparison
equal
deleted
inserted
replaced
| 550:56bdfae9e4ea | 551:53dc98ffde16 |
|---|---|
| 26 local s2s_new_incoming = require "core.s2smanager".new_incoming; | 26 local s2s_new_incoming = require "core.s2smanager".new_incoming; |
| 27 local s2s_streamopened = require "core.s2smanager".streamopened; | 27 local s2s_streamopened = require "core.s2smanager".streamopened; |
| 28 local s2s_streamclosed = require "core.s2smanager".streamclosed; | 28 local s2s_streamclosed = require "core.s2smanager".streamclosed; |
| 29 local s2s_destroy_session = require "core.s2smanager".destroy_session; | 29 local s2s_destroy_session = require "core.s2smanager".destroy_session; |
| 30 local s2s_attempt_connect = require "core.s2smanager".attempt_connection; | 30 local s2s_attempt_connect = require "core.s2smanager".attempt_connection; |
| 31 local stream_callbacks = { streamopened = s2s_streamopened, streamclosed = s2s_streamclosed }; | 31 local stream_callbacks = { streamopened = s2s_streamopened, streamclosed = s2s_streamclosed, handlestanza = core_process_stanza }; |
| 32 | 32 |
| 33 local connlisteners_register = require "net.connlisteners".register; | 33 local connlisteners_register = require "net.connlisteners".register; |
| 34 | 34 |
| 35 local t_insert = table.insert; | 35 local t_insert = table.insert; |
| 36 local t_concat = table.concat; | 36 local t_concat = table.concat; |
| 119 -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, | 119 -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, |
| 120 -- this will avoid the useless indirection we have atm | 120 -- this will avoid the useless indirection we have atm |
| 121 -- (I'm on a mission, no time to fix now) | 121 -- (I'm on a mission, no time to fix now) |
| 122 | 122 |
| 123 -- Debug version -- | 123 -- Debug version -- |
| 124 local function handleerr(err) print("Traceback:", err, debug.traceback()); end | 124 -- local function handleerr(err) print("Traceback:", err, debug.traceback()); end |
| 125 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end | 125 -- session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end |
| 126 end | 126 end |
| 127 if data then | 127 if data then |
| 128 session.data(conn, data); | 128 session.data(conn, data); |
| 129 end | 129 end |
| 130 end | 130 end |
