Fix for checking components, but we need to look at this whole block to optimise it, really we do

Sat, 08 Nov 2008 00:10:01 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 08 Nov 2008 00:10:01 +0000
changeset 220
e8edcbce4d46
parent 219
f06e97f525bc
child 223
d5dffc919b33

Fix for checking components, but we need to look at this whole block to optimise it, really we do

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Thu Nov 06 16:57:10 2008 +0500
+++ b/core/stanza_router.lua	Sat Nov 08 00:10:01 2008 +0000
@@ -81,7 +81,7 @@
 		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
 		component_handle_stanza(origin, stanza);
-	elseif hosts[host].type == "component" then -- directed at a component
+	elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
 		component_handle_stanza(origin, stanza);
 	elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then
 		handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare);

mercurial