178 end |
178 end |
179 if (not hosts[from_host]) or (not hosts[from_host].disallow_s2s) then |
179 if (not hosts[from_host]) or (not hosts[from_host].disallow_s2s) then |
180 local xmlns = stanza.attr.xmlns; |
180 local xmlns = stanza.attr.xmlns; |
181 --stanza.attr.xmlns = "jabber:server"; |
181 --stanza.attr.xmlns = "jabber:server"; |
182 stanza.attr.xmlns = nil; |
182 stanza.attr.xmlns = nil; |
183 log("debug", "sending s2s stanza: %s", tostring(stanza)); |
183 log("debug", "sending s2s stanza: %s", tostring(stanza.top_tag and stanza:top_tag()) or stanza); |
184 send_s2s(origin.host, host, stanza); -- TODO handle remote routing errors |
184 send_s2s(origin.host, host, stanza); -- TODO handle remote routing errors |
185 stanza.attr.xmlns = xmlns; -- reset |
185 stanza.attr.xmlns = xmlns; -- reset |
186 else |
186 else |
187 core_route_stanza(hosts[from_host], st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote servers is not allowed")); |
187 core_route_stanza(hosts[from_host], st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote servers is not allowed")); |
188 end |
188 end |