From 522292ae3d544e36d39f68a36bbba5ad3af208d3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 8 Nov 2008 00:10:01 +0000 Subject: Fix for checking components, but we need to look at this whole block to optimise it, really we do --- core/stanza_router.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 68a71d3b..0ce5dd69 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -81,7 +81,7 @@ function core_process_stanza(origin, stanza) 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); -- cgit v1.2.3