Comparison

core/s2smanager.lua @ 5369:a344c1120e2b

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 22 Mar 2013 15:16:43 +0000
parent 5367:56db8f2c8563
child 5447:92b88476873a
comparison
equal deleted inserted replaced
5364:61cf6b84ae81 5369:a344c1120e2b
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8 8
9 9
10 10
11 local hosts = hosts; 11 local hosts = prosody.hosts;
12 local tostring, pairs, getmetatable, newproxy, setmetatable 12 local tostring, pairs, getmetatable, newproxy, setmetatable
13 = tostring, pairs, getmetatable, newproxy, setmetatable; 13 = tostring, pairs, getmetatable, newproxy, setmetatable;
14 14
15 local logger_init = require "util.logger".init; 15 local logger_init = require "util.logger".init;
16 16
36 session.log = logger_init("s2sin"..tostring(session):match("[a-f0-9]+$")); 36 session.log = logger_init("s2sin"..tostring(session):match("[a-f0-9]+$"));
37 incoming_s2s[session] = true; 37 incoming_s2s[session] = true;
38 return session; 38 return session;
39 end 39 end
40 40
41 function new_outgoing(from_host, to_host, connect) 41 function new_outgoing(from_host, to_host)
42 local host_session = { to_host = to_host, from_host = from_host, host = from_host, 42 local host_session = { to_host = to_host, from_host = from_host, host = from_host,
43 notopen = true, type = "s2sout_unauthed", direction = "outgoing" }; 43 notopen = true, type = "s2sout_unauthed", direction = "outgoing" };
44 hosts[from_host].s2sout[to_host] = host_session; 44 hosts[from_host].s2sout[to_host] = host_session;
45 local conn_name = "s2sout"..tostring(host_session):match("[a-f0-9]*$"); 45 local conn_name = "s2sout"..tostring(host_session):match("[a-f0-9]*$");
46 host_session.log = logger_init(conn_name); 46 host_session.log = logger_init(conn_name);