core/stanza_router.lua

changeset 2279
27441b099984
parent 2132
20a52cfda988
child 2460
2a80ba15c210
equal deleted inserted replaced
2278:0b0fe49e5251 2279:27441b099984
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

mercurial