Software /
code /
prosody
Comparison
core/s2smanager.lua @ 344:ed5824e9dd94
Don't attempt to auth connection unless stanzas are being sent across it
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 19 Nov 2008 05:12:21 +0000 |
parent | 343:cae2178b5623 |
child | 345:6a7acfc1c933 |
comparison
equal
deleted
inserted
replaced
343:cae2178b5623 | 344:ed5824e9dd94 |
---|---|
33 function send_to_host(from_host, to_host, data) | 33 function send_to_host(from_host, to_host, data) |
34 if data.name then data = tostring(data); end | 34 if data.name then data = tostring(data); end |
35 local host = hosts[from_host].s2sout[to_host]; | 35 local host = hosts[from_host].s2sout[to_host]; |
36 if host then | 36 if host then |
37 -- We have a connection to this host already | 37 -- We have a connection to this host already |
38 if host.type == "s2sout_unauthed" then | 38 if host.type == "s2sout_unauthed" and ((not data.xmlns) or data.xmlns == "jabber:client" or data.xmlns == "jabber:server") then |
39 (host.log or log)("debug", "trying to send over unauthed s2sout to "..to_host..", authing it now..."); | 39 (host.log or log)("debug", "trying to send over unauthed s2sout to "..to_host..", authing it now..."); |
40 if not host.notopen and not host.dialback_key then | 40 if not host.notopen and not host.dialback_key then |
41 host.log("debug", "dialback had not been initiated"); | 41 host.log("debug", "dialback had not been initiated"); |
42 initiate_dialback(host); | 42 initiate_dialback(host); |
43 end | 43 end |