net/xmppserver_listener.lua

changeset 431
3c89a073db53
parent 426
3d8778059e90
child 434
0d7ba3742f7a
equal deleted inserted replaced
430:f9b43bb9d807 431:3c89a073db53
128 session_reset_stream(session); -- Initialise, ready for use 128 session_reset_stream(session); -- Initialise, ready for use
129 129
130 -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, 130 -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call,
131 -- this will avoid the useless indirection we have atm 131 -- this will avoid the useless indirection we have atm
132 -- (I'm on a mission, no time to fix now) 132 -- (I'm on a mission, no time to fix now)
133 local function handleerr(err) print("Traceback:", err, debug.traceback()); end
133 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end 134 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end
134 end 135 end
135 136
136 connlisteners_register("xmppserver", xmppserver); 137 connlisteners_register("xmppserver", xmppserver);
137 138

mercurial