aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-08 00:10:01 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-08 00:10:01 +0000
commit522292ae3d544e36d39f68a36bbba5ad3af208d3 (patch)
tree91e0648518611bd1c27e3e3019fa4efb5d8dffbc
parenta88ddeb67d6d8a31da4ac79d1c2d1a1d776c2c7c (diff)
downloadprosody-522292ae3d544e36d39f68a36bbba5ad3af208d3.tar.gz
prosody-522292ae3d544e36d39f68a36bbba5ad3af208d3.zip
Fix for checking components, but we need to look at this whole block to optimise it, really we do
-rw-r--r--core/stanza_router.lua2
1 files changed, 1 insertions, 1 deletions
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);