s2smanager: Use session-specific logger to log outgoing data on outgoing s2s connections

Sun, 18 Oct 2009 16:16:27 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 18 Oct 2009 16:16:27 +0100
changeset 2019
c712ea57b877
parent 2018
418c04834017
child 2020
24f54340a670

s2smanager: Use session-specific logger to log outgoing data on outgoing s2s connections

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Sun Oct 18 22:49:03 2009 +0500
+++ b/core/s2smanager.lua	Sun Oct 18 16:16:27 2009 +0100
@@ -315,7 +315,7 @@
 	-- otherwise it will assume it is a new incoming connection
 	cl.register_outgoing(conn, host_session);
 	
-	local w = conn.write;
+	local w, log = conn.write, host_session.log;
 	host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end
 	
 	conn.write(format([[<stream:stream xmlns='jabber:server' xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' from='%s' to='%s' version='1.0' xml:lang='en'>]], from_host, to_host));

mercurial