stanza_router: Use stanza.attr.from's host instead of origin.host when routing stanza...
authorWaqas Hussain <waqas20@gmail.com>
Sun, 14 Jun 2009 09:28:20 +0000 (14:28 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Sun, 14 Jun 2009 09:28:20 +0000 (14:28 +0500)
core/stanza_router.lua

index f27cc10095ff4d7e480e847991d03deb771f5965..22064f3f2a0304e2f829a933d6e8f2f08f01abb3 100644 (file)
@@ -310,8 +310,8 @@ function core_route_stanza(origin, stanza)
                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