Software /
code /
prosody
Diff
net/xmppserver_listener.lua @ 426:3d8778059e90
Wrapped a core_process_stanza call in an xpcall call
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 26 Nov 2008 09:47:16 +0500 |
parent | 342:52f75260a22d |
child | 431:3c89a073db53 |
line wrap: on
line diff
--- 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);