Software /
code /
prosody
Comparison
core/stanza_router.lua @ 1521:cee81a5ae949
stanza_router: Catch and log an error case which I don't think should happen (but sometimes seems to)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 10 Jul 2009 02:50:57 +0100 |
parent | 1466:95f8024c77fc |
child | 1523:841d61be198f |
comparison
equal
deleted
inserted
replaced
1520:218075f1daf4 | 1521:cee81a5ae949 |
---|---|
171 if hosts[host] then | 171 if hosts[host] then |
172 -- old stanza routing code removed | 172 -- old stanza routing code removed |
173 core_post_stanza(origin, stanza); | 173 core_post_stanza(origin, stanza); |
174 elseif origin.type == "c2s" then | 174 elseif origin.type == "c2s" then |
175 -- Remote host | 175 -- Remote host |
176 if not hosts[from_host].disallow_s2s then | 176 if not hosts[from_host] then |
177 log("error", "No hosts[from_host] (please report): %s", tostring(stanza)); | |
178 end | |
179 if (not hosts[from_host]) or (not hosts[from_host].disallow_s2s) then | |
177 local xmlns = stanza.attr.xmlns; | 180 local xmlns = stanza.attr.xmlns; |
178 --stanza.attr.xmlns = "jabber:server"; | 181 --stanza.attr.xmlns = "jabber:server"; |
179 stanza.attr.xmlns = nil; | 182 stanza.attr.xmlns = nil; |
180 log("debug", "sending s2s stanza: %s", tostring(stanza)); | 183 log("debug", "sending s2s stanza: %s", tostring(stanza)); |
181 send_s2s(origin.host, host, stanza); -- TODO handle remote routing errors | 184 send_s2s(origin.host, host, stanza); -- TODO handle remote routing errors |