diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-08-16 21:41:53 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-08-16 21:41:53 +0100 |
commit | b5d5ab2446bacedb0ba7e4509f6ea45426b8bc5a (patch) | |
tree | daece93946c19d995608e6049a4c1df6600e0e8d | |
parent | 50ff248b0e85d4ef277e4a1c03b77e7d350506fb (diff) | |
download | prosody-b5d5ab2446bacedb0ba7e4509f6ea45426b8bc5a.tar.gz prosody-b5d5ab2446bacedb0ba7e4509f6ea45426b8bc5a.zip |
core.s2smanager, xmppserver_listener: Move the responsibility of setting session.log from the latter to the former for incoming sessions (outgoing are already like this)
-rw-r--r-- | core/s2smanager.lua | 1 | ||||
-rw-r--r-- | net/xmppserver_listener.lua | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 0589e024..ab2e4a5c 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -126,6 +126,7 @@ function new_incoming(conn) end 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(tostring(t)); end incoming_s2s[session] = true; return session; diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index 1f27d841..6a196446 100644 --- a/net/xmppserver_listener.lua +++ b/net/xmppserver_listener.lua @@ -114,12 +114,6 @@ function xmppserver.listener(conn, data) session = s2s_new_incoming(conn); sessions[conn] = session; - -- Logging functions -- - - - local conn_name = "s2sin"..tostring(conn):match("[a-f0-9]+$"); - session.log = logger.init(conn_name); - session.log("info", "Incoming s2s connection"); session.reset_stream = session_reset_stream; |