Mercurial > prosody-hg
comparison core/s2smanager.lua @ 5306:10bc0e2aa55e
s2smanager: Generate session names used for logging the same way everywhere
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 24 Jan 2013 00:58:17 +0100 |
| parents | 50688a2856f7 |
| children | 0d11e393201f |
comparison
equal
deleted
inserted
replaced
| 5305:391b72fede9f | 5306:10bc0e2aa55e |
|---|---|
| 33 if true then | 33 if true then |
| 34 session.trace = newproxy(true); | 34 session.trace = newproxy(true); |
| 35 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end; | 35 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end; |
| 36 end | 36 end |
| 37 open_sessions = open_sessions + 1; | 37 open_sessions = open_sessions + 1; |
| 38 session.log = logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$")); | 38 session.log = logger_init("s2sin"..tostring(session):match("[a-f0-9]+$")); |
| 39 incoming_s2s[session] = true; | 39 incoming_s2s[session] = true; |
| 40 return session; | 40 return session; |
| 41 end | 41 end |
| 42 | 42 |
| 43 function new_outgoing(from_host, to_host, connect) | 43 function new_outgoing(from_host, to_host, connect) |
