# HG changeset patch # User Matthew Wild # Date 1278678521 -3600 # Node ID 8520cd88b84c0775009ec1b6958e7fb691ec63bd # Parent b16f842b7525b7b66fec9698ef2272944b124114 xmpp{client,server}_listener: Convert some calls to tail calls for efficiency diff -r b16f842b7525 -r 8520cd88b84c net/xmppclient_listener.lua --- a/net/xmppclient_listener.lua Fri Jul 09 13:22:58 2010 +0100 +++ b/net/xmppclient_listener.lua Fri Jul 09 13:28:41 2010 +0100 @@ -66,7 +66,7 @@ function stream_callbacks.handlestanza(session, stanza) stanza = session.filter("stanzas/in", stanza); if stanza then - xpcall(function () core_process_stanza(session, stanza) end, handleerr); + return xpcall(function () return core_process_stanza(session, stanza) end, handleerr); end end diff -r b16f842b7525 -r 8520cd88b84c net/xmppserver_listener.lua --- a/net/xmppserver_listener.lua Fri Jul 09 13:22:58 2010 +0100 +++ b/net/xmppserver_listener.lua Fri Jul 09 13:28:41 2010 +0100 @@ -55,7 +55,7 @@ end stanza = session.filter("stanzas/in", stanza); if stanza then - xpcall(function () core_process_stanza(session, stanza) end, handleerr); + return xpcall(function () return core_process_stanza(session, stanza) end, handleerr); end end