298 send_s2s(origin.host, host, stanza); -- TODO handle remote routing errors |
298 send_s2s(origin.host, host, stanza); -- TODO handle remote routing errors |
299 stanza.attr.xmlns = xmlns; -- reset |
299 stanza.attr.xmlns = xmlns; -- reset |
300 elseif origin.type == "component" or origin.type == "local" then |
300 elseif origin.type == "component" or origin.type == "local" then |
301 -- Route via s2s for components and modules |
301 -- Route via s2s for components and modules |
302 log("debug", "Routing outgoing stanza for %s to %s", origin.host, host); |
302 log("debug", "Routing outgoing stanza for %s to %s", origin.host, host); |
303 for k,v in pairs(origin) do print("origin:", tostring(k), tostring(v)); end |
|
304 print(tostring(host), tostring(from_host)) |
|
305 send_s2s(origin.host, host, stanza); |
303 send_s2s(origin.host, host, stanza); |
306 else |
304 else |
307 log("warn", "received stanza from unhandled connection type: %s", origin.type); |
305 log("warn", "received stanza from unhandled connection type: %s", origin.type); |
308 end |
306 end |
309 stanza.attr.to = to; -- reset |
307 stanza.attr.to = to; -- reset |