# HG changeset patch # User Matthew Wild # Date 1226103001 0 # Node ID e8edcbce4d4685ee681ab29ff63370cef390e537 # Parent f06e97f525bc23b125a97870952b61bcb9016077 Fix for checking components, but we need to look at this whole block to optimise it, really we do diff -r f06e97f525bc -r e8edcbce4d46 core/stanza_router.lua --- 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);