diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-20 04:39:54 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-20 04:39:54 +0000 |
commit | 9d6d5c3913346c9ad3a9777a4ce30bffa2a6d1d6 (patch) | |
tree | d296d507efd900b38e10f6c4bb05221db1a82aa0 | |
parent | 4cac67d580f99530cd401f4b9b7e7f2036697ada (diff) | |
download | prosody-9d6d5c3913346c9ad3a9777a4ce30bffa2a6d1d6.tar.gz prosody-9d6d5c3913346c9ad3a9777a4ce30bffa2a6d1d6.zip |
s2smanager: Queue db:verify unless we already sent a db:result (if we had then it can could a dialback deadlock). Also remove some redundant code which could cause a db:result to be sent while still negotiating features (e.g. TLS) and break things. Collectively these fix a 'random' s2s failure (usually with ejabberd for some reason) - resulting in an 'unbound prefix' XML error, or 'ssl handshake failure'. Was this commit message long enough? I think so.
-rw-r--r-- | core/s2smanager.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 3613707c..21bcb2dc 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -82,12 +82,8 @@ 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" and data.name ~= "db:verify" and ((not data.xmlns) or data.xmlns == "jabber:client" or data.xmlns == "jabber:server") then + if host.type == "s2sout_unauthed" and (data.name ~= "db:verify" or not host.dialback_key) 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); - if not host.notopen and not host.dialback_key and host.sends2s then - host.log("debug", "dialback had not been initiated"); - initiate_dialback(host); - end -- Queue stanza until we are able to send it if host.sendq then t_insert(host.sendq, {tostring(data), st.reply(data)}); |