Software /
code /
prosody
Comparison
core/s2smanager.lua @ 2089:fdd7280c4621
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.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 20 Nov 2009 04:39:54 +0000 |
parent | 2019:c712ea57b877 |
child | 2090:7810648ea26d |
comparison
equal
deleted
inserted
replaced
2088:5a9dc066a388 | 2089:fdd7280c4621 |
---|---|
80 | 80 |
81 function send_to_host(from_host, to_host, data) | 81 function send_to_host(from_host, to_host, data) |
82 local host = hosts[from_host].s2sout[to_host]; | 82 local host = hosts[from_host].s2sout[to_host]; |
83 if host then | 83 if host then |
84 -- We have a connection to this host already | 84 -- We have a connection to this host already |
85 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 | 85 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 |
86 (host.log or log)("debug", "trying to send over unauthed s2sout to "..to_host); | 86 (host.log or log)("debug", "trying to send over unauthed s2sout to "..to_host); |
87 if not host.notopen and not host.dialback_key and host.sends2s then | |
88 host.log("debug", "dialback had not been initiated"); | |
89 initiate_dialback(host); | |
90 end | |
91 | 87 |
92 -- Queue stanza until we are able to send it | 88 -- Queue stanza until we are able to send it |
93 if host.sendq then t_insert(host.sendq, {tostring(data), st.reply(data)}); | 89 if host.sendq then t_insert(host.sendq, {tostring(data), st.reply(data)}); |
94 else host.sendq = { {tostring(data), st.reply(data)} }; end | 90 else host.sendq = { {tostring(data), st.reply(data)} }; end |
95 host.log("debug", "stanza [%s] queued ", data.name); | 91 host.log("debug", "stanza [%s] queued ", data.name); |