diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-10-24 14:59:04 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-10-24 14:59:04 +0100 |
commit | 8f431fdd223923be8d57ce8d847bf80d34560653 (patch) | |
tree | 6991901ddd1b63a272fea0bea44ce99644ac03e2 | |
parent | 0aade7cf5f6f347d1f71335679f97cd54f8f01eb (diff) | |
download | prosody-8f431fdd223923be8d57ce8d847bf80d34560653.tar.gz prosody-8f431fdd223923be8d57ce8d847bf80d34560653.zip |
Hack until we get SRV resolving
-rw-r--r-- | core/s2smanager.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 1d718305..c2df2020 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -20,6 +20,8 @@ local md5_hash = require "util.hashes".md5; local dialback_secret = "This is very secret!!! Ha!"; +local srvmap = { ["gmail.com"] = "talk.google.com", ["identi.ca"] = "longlance.controlezvous.ca" }; + module "s2smanager" function connect_host(from_host, to_host) @@ -64,6 +66,7 @@ function new_outgoing(from_host, to_host) local conn, handler = socket.tcp() --FIXME: Below parameters (ports/ip) are incorrect (use SRV) + to_host = srvmap[to_host] or to_host; conn:connect(to_host, 5269); conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx ); host_session.conn = conn; |