Comparison

core/stanza_router.lua @ 640:068130563311

Changed order of checking for component hosts to check the full and bare JIDs before the hostname (at another place)
author Waqas Hussain <waqas20@gmail.com>
date Thu, 25 Dec 2008 04:27:19 +0500
parent 631:6957fe7b0313
child 641:658a2de74afc
comparison
equal deleted inserted replaced
638:1915c64c9436 640:068130563311
97 core_handle_stanza(origin, stanza); 97 core_handle_stanza(origin, stanza);
98 elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server 98 elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server
99 core_handle_stanza(origin, stanza); 99 core_handle_stanza(origin, stanza);
100 elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then 100 elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then
101 modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza); 101 modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza);
102 elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
103 component_handle_stanza(origin, stanza);
102 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server 104 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
103 component_handle_stanza(origin, stanza);
104 elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
105 component_handle_stanza(origin, stanza); 105 component_handle_stanza(origin, stanza);
106 elseif hosts[host] and hosts[host].type == "component" then -- directed at a component 106 elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
107 component_handle_stanza(origin, stanza); 107 component_handle_stanza(origin, stanza);
108 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then 108 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then
109 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); 109 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);