Comparison

core/s2smanager.lua @ 4833:b7a6e86ab87d

Merge with Zash
author Matthew Wild <mwild1@gmail.com>
date Thu, 10 May 2012 23:10:56 +0100
parent 4822:5ef05f32bc42
parent 4832:6b3aec1e0d9f
child 4930:42ac50c0382e
comparison
equal deleted inserted replaced
4822:5ef05f32bc42 4833:b7a6e86ab87d
7 -- 7 --
8 8
9 9
10 10
11 local hosts = hosts; 11 local hosts = hosts;
12 local core_process_stanza = function(a, b) core_process_stanza(a, b); end 12 local tostring, pairs, ipairs, getmetatable, newproxy, setmetatable
13 local format = string.format; 13 = tostring, pairs, ipairs, getmetatable, newproxy, setmetatable;
14 local t_insert, t_sort = table.insert, table.sort;
15 local get_traceback = debug.traceback;
16 local tostring, pairs, ipairs, getmetatable, newproxy, type, error, tonumber, setmetatable
17 = tostring, pairs, ipairs, getmetatable, newproxy, type, error, tonumber, setmetatable;
18
19 local initialize_filters = require "util.filters".initialize;
20 local wrapclient = require "net.server".wrapclient;
21 local st = require "stanza";
22 local stanza = st.stanza;
23 local nameprep = require "util.encodings".stringprep.nameprep;
24 local cert_verify_identity = require "util.x509".verify_identity;
25 local new_ip = require "util.ip".new_ip;
26 local rfc3484_dest = require "util.rfc3484".destination;
27 14
28 local fire_event = prosody.events.fire_event; 15 local fire_event = prosody.events.fire_event;
29 local uuid_gen = require "util.uuid".generate;
30
31 local logger_init = require "util.logger".init; 16 local logger_init = require "util.logger".init;
32 17
33 local log = logger_init("s2smanager"); 18 local log = logger_init("s2smanager");
34 19
35 local sha256_hash = require "util.hashes".sha256;
36
37 local adns, dns = require "net.adns", require "net.dns";
38 local config = require "core.configmanager"; 20 local config = require "core.configmanager";
39 local dns_timeout = config.get("*", "core", "dns_timeout") or 15;
40 local cfg_sources = config.get("*", "core", "s2s_interface")
41 or config.get("*", "core", "interface");
42 local sources;
43
44 --FIXME: s2sout should create its own resolver w/ timeout
45 dns.settimeout(dns_timeout);
46 21
47 local prosody = _G.prosody; 22 local prosody = _G.prosody;
48 incoming_s2s = {}; 23 incoming_s2s = {};
49 prosody.incoming_s2s = incoming_s2s; 24 prosody.incoming_s2s = incoming_s2s;
50 local incoming_s2s = incoming_s2s; 25 local incoming_s2s = incoming_s2s;