# HG changeset patch # User Matthew Wild # Date 1226274894 0 # Node ID a8e0d0faade3ec608ec0b652fb83c4ab7a832662 # Parent eb4ac201aad20d0a38b28998787d4cc6f3abf9c5# Parent c1e9b3f3f3a71eb4122cad06ac54765d77183f56 Merge from waqas diff -r c1e9b3f3f3a7 -r a8e0d0faade3 core/s2smanager.lua --- a/core/s2smanager.lua Mon Nov 10 04:53:42 2008 +0500 +++ b/core/s2smanager.lua Sun Nov 09 23:54:54 2008 +0000 @@ -76,6 +76,12 @@ local cl = connlisteners_get("xmppserver"); local conn, handler = socket.tcp() + + + -- Register this outgoing connection so that xmppserver_listener knows about it + -- otherwise it will assume it is a new incoming connection + cl.register_outgoing(conn, host_session); + --FIXME: Below parameters (ports/ip) are incorrect (use SRV) to_host = srvmap[to_host] or to_host; conn:settimeout(0.1); @@ -83,10 +89,6 @@ conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx ); host_session.conn = conn; - -- Register this outgoing connection so that xmppserver_listener knows about it - -- otherwise it will assume it is a new incoming connection - cl.register_outgoing(conn, host_session); - do local conn_name = "s2sout"..tostring(conn):match("[a-f0-9]*$"); host_session.log = logger_init(conn_name);