Hack until we get SRV resolving
authorMatthew Wild <mwild1@gmail.com>
Fri, 24 Oct 2008 13:59:04 +0000 (14:59 +0100)
committerMatthew Wild <mwild1@gmail.com>
Fri, 24 Oct 2008 13:59:04 +0000 (14:59 +0100)
core/s2smanager.lua

index 1d7183050e31c48220e8fbb81231022b92441386..c2df2020956291daa80632b2762de6bb35e4d4c6 100644 (file)
@@ -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;