Software /
code /
prosody
Comparison
core/s2smanager.lua @ 1686:232c2bf155c7
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)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 16 Aug 2009 21:41:53 +0100 |
parent | 1523:841d61be198f |
child | 1792:407f282f559e |
comparison
equal
deleted
inserted
replaced
1685:f5e24a63d233 | 1686:232c2bf155c7 |
---|---|
124 session.trace = newproxy(true); | 124 session.trace = newproxy(true); |
125 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end; | 125 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end; |
126 end | 126 end |
127 open_sessions = open_sessions + 1; | 127 open_sessions = open_sessions + 1; |
128 local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$")); | 128 local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$")); |
129 session.log = log; | |
129 session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end | 130 session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end |
130 incoming_s2s[session] = true; | 131 incoming_s2s[session] = true; |
131 return session; | 132 return session; |
132 end | 133 end |
133 | 134 |