Hack until we get SRV resolving

Fri, 24 Oct 2008 14:59:04 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 24 Oct 2008 14:59:04 +0100
changeset 157
f4e9b6ec34b0
parent 156
884c43c7028a
child 158
7ea96f944681

Hack until we get SRV resolving

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Fri Oct 24 14:47:23 2008 +0100
+++ b/core/s2smanager.lua	Fri Oct 24 14:59:04 2008 +0100
@@ -20,6 +20,8 @@
 
 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 @@
 		
 		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;

mercurial