Changed order of checking for component hosts to check the full and bare JIDs before the hostname (at another place)

Thu, 25 Dec 2008 04:27:19 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 25 Dec 2008 04:27:19 +0500
changeset 640
068130563311
parent 638
1915c64c9436
child 641
658a2de74afc

Changed order of checking for component hosts to check the full and bare JIDs before the hostname (at another place)

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Wed Dec 24 05:10:13 2008 +0500
+++ b/core/stanza_router.lua	Thu Dec 25 04:27:19 2008 +0500
@@ -99,9 +99,9 @@
 			core_handle_stanza(origin, stanza);
 		elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then
 			modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza);
-		elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
+		elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
 			component_handle_stanza(origin, stanza);
-		elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
+		elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
 			component_handle_stanza(origin, stanza);
 		elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
 			component_handle_stanza(origin, stanza);

mercurial