stanza_router: Use stanza.attr.from's host instead of origin.host when routing stanzas to remote hosts (fixes problem with sending from node@host components)
authorWaqas Hussain <waqas20@gmail.com>
Sun, 14 Jun 2009 14:28:20 +0500
changeset 1348 ffa70c0df850
parent 1346 e34f9455b779
child 1349 1d6c4a6c75e5
stanza_router: Use stanza.attr.from's host instead of origin.host when routing stanzas to remote hosts (fixes problem with sending from node@host components)
core/stanza_router.lua
--- a/core/stanza_router.lua	Sat Jun 13 00:07:16 2009 +0500
+++ b/core/stanza_router.lua	Sun Jun 14 14:28:20 2009 +0500
@@ -310,8 +310,8 @@
 		stanza.attr.xmlns = xmlns; -- reset
 	elseif origin.type == "component" or origin.type == "local" then
 		-- Route via s2s for components and modules
-		log("debug", "Routing outgoing stanza for %s to %s", origin.host, host);
-		send_s2s(origin.host, host, stanza);
+		log("debug", "Routing outgoing stanza for %s to %s", from_host, host);
+		send_s2s(from_host, host, stanza);
 	else
 		log("warn", "received stanza from unhandled connection type: %s", origin.type);
 	end