From 1309f761cb42ad3502fda993efaf56cb3dca3860 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 2 Jul 2010 17:43:01 +0100 Subject: s2smanager: Register outgoing connection with the connection listener only after initializing filters (thanks darkrain, dersd) --- core/s2smanager.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/s2smanager.lua') diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 711f9464..5853b2ec 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -342,10 +342,6 @@ function make_connect(host_session, connect_host, connect_port) conn = wrapclient(conn, connect_host, connect_port, cl, cl.default_mode or 1 ); 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); - local filter = initialize_filters(host_session); local w, log = conn.write, host_session.log; host_session.sends2s = function (t) @@ -361,6 +357,10 @@ function make_connect(host_session, connect_host, connect_port) end end + -- 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); + host_session:open_stream(from_host, to_host); log("debug", "Connection attempt in progress..."); -- cgit v1.2.3