Comparison

core/s2smanager.lua @ 2231:288832cdec52

s2smanager: Allow configuration of the dialback_secret in the config
author Matthew Wild <mwild1@gmail.com>
date Thu, 26 Nov 2009 17:17:54 +0000
parent 2166:fb01f0906564
child 2368:4726cd9a6318
comparison
equal deleted inserted replaced
2230:aa830ab55bbc 2231:288832cdec52
34 34
35 local log = logger_init("s2smanager"); 35 local log = logger_init("s2smanager");
36 36
37 local sha256_hash = require "util.hashes".sha256; 37 local sha256_hash = require "util.hashes".sha256;
38 38
39 local dialback_secret = uuid_gen();
40
41 local adns, dns = require "net.adns", require "net.dns"; 39 local adns, dns = require "net.adns", require "net.dns";
42 local config = require "core.configmanager"; 40 local config = require "core.configmanager";
43 local connect_timeout = config.get("*", "core", "s2s_timeout") or 60; 41 local connect_timeout = config.get("*", "core", "s2s_timeout") or 60;
44 local dns_timeout = config.get("*", "core", "dns_timeout") or 60; 42 local dns_timeout = config.get("*", "core", "dns_timeout") or 60;
45 local max_dns_depth = config.get("*", "core", "dns_max_depth") or 3; 43 local max_dns_depth = config.get("*", "core", "dns_max_depth") or 3;
44 local dialback_secret = config.get("*", "core", "dialback_secret") or uuid_gen();
46 45
47 incoming_s2s = {}; 46 incoming_s2s = {};
48 _G.prosody.incoming_s2s = incoming_s2s; 47 _G.prosody.incoming_s2s = incoming_s2s;
49 local incoming_s2s = incoming_s2s; 48 local incoming_s2s = incoming_s2s;
50 49