Comparison

core/s2smanager.lua @ 2019:c712ea57b877

s2smanager: Use session-specific logger to log outgoing data on outgoing s2s connections
author Matthew Wild <mwild1@gmail.com>
date Sun, 18 Oct 2009 16:16:27 +0100
parent 1976:5f3eaab987c3
child 2089:fdd7280c4621
comparison
equal deleted inserted replaced
2018:418c04834017 2019:c712ea57b877
313 313
314 -- Register this outgoing connection so that xmppserver_listener knows about it 314 -- Register this outgoing connection so that xmppserver_listener knows about it
315 -- otherwise it will assume it is a new incoming connection 315 -- otherwise it will assume it is a new incoming connection
316 cl.register_outgoing(conn, host_session); 316 cl.register_outgoing(conn, host_session);
317 317
318 local w = conn.write; 318 local w, log = conn.write, host_session.log;
319 host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end 319 host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end
320 320
321 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)); 321 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));
322 log("debug", "Connection attempt in progress..."); 322 log("debug", "Connection attempt in progress...");
323 add_task(connect_timeout, function () 323 add_task(connect_timeout, function ()