diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-22 04:50:42 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-22 04:50:42 +0000 |
commit | 6ff5582acc0198d77b949d98c251cedb033a08be (patch) | |
tree | bdaa91278226dd634886ab556df1d00b9eb3ca43 /core/s2smanager.lua | |
parent | 24dba04dcbd28501a568528f287a577036fe863e (diff) | |
parent | 87edc64c11a5f38229c915f32165bccd2de65a84 (diff) | |
download | prosody-6ff5582acc0198d77b949d98c251cedb033a08be.tar.gz prosody-6ff5582acc0198d77b949d98c251cedb033a08be.zip |
Merge with trunk
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r-- | core/s2smanager.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 5dae58c9..fb532a73 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -128,7 +128,7 @@ function new_incoming(conn) open_sessions = open_sessions + 1; local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$")); session.log = log; - session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(conn, tostring(t)); end + session.sends2s = function (t) log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^([^>]*>?)"); w(conn, tostring(t)); end incoming_s2s[session] = true; add_task(connect_timeout, function () if session.conn ~= conn or @@ -317,7 +317,7 @@ function make_connect(host_session, connect_host, connect_port) cl.register_outgoing(conn, host_session); local w, log = conn.write, host_session.log; - host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(conn, tostring(t)); end + host_session.sends2s = function (t) log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?")); w(conn, 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)); log("debug", "Connection attempt in progress..."); |