Don't attempt to auth connection unless stanzas are being sent across it
authorMatthew Wild <mwild1@gmail.com>
Wed, 19 Nov 2008 05:12:21 +0000 (05:12 +0000)
committerMatthew Wild <mwild1@gmail.com>
Wed, 19 Nov 2008 05:12:21 +0000 (05:12 +0000)
core/s2smanager.lua

index 1a600db2537f5ad82697aa67d875246d0186efb5..7d07ad7ae43457e27d41d795e8eb4a5bb4f3c6e8 100644 (file)
@@ -35,7 +35,7 @@ function send_to_host(from_host, to_host, data)
        local host = hosts[from_host].s2sout[to_host];
        if host then
                -- We have a connection to this host already
-               if host.type == "s2sout_unauthed" then
+               if host.type == "s2sout_unauthed" and ((not data.xmlns) or data.xmlns == "jabber:client" or data.xmlns == "jabber:server") then
                        (host.log or log)("debug", "trying to send over unauthed s2sout to "..to_host..", authing it now...");
                        if not host.notopen and not host.dialback_key then
                                host.log("debug", "dialback had not been initiated");