# HG changeset patch # User Waqas Hussain # Date 1227674836 -18000 # Node ID 3d8778059e90c6a6fdee33c6a39a6b3ca3c489bd # Parent f3b65866192ed6c37754d42ec5ac58745c9f69e8 Wrapped a core_process_stanza call in an xpcall call diff -r f3b65866192e -r 3d8778059e90 net/xmppserver_listener.lua --- a/net/xmppserver_listener.lua Wed Nov 26 09:06:32 2008 +0500 +++ b/net/xmppserver_listener.lua Wed Nov 26 09:47:16 2008 +0500 @@ -130,7 +130,7 @@ -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, -- this will avoid the useless indirection we have atm -- (I'm on a mission, no time to fix now) - session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end + session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end end connlisteners_register("xmppserver", xmppserver);