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 |