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 session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end |
133 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end |
134 end |
134 end |
135 |
135 |
136 connlisteners_register("xmppserver", xmppserver); |
136 connlisteners_register("xmppserver", xmppserver); |
137 |
137 |
138 |
138 |