aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-10 02:50:57 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-10 02:50:57 +0100
commitdef653fa2612573f537fdf7da5ac0214bb882b59 (patch)
tree2b52de913062c7f23b198f555a6dba788b0b7372 /core
parent0b3fb9b027b3ed1bc783c719e48d6e94a5ae571b (diff)
downloadprosody-def653fa2612573f537fdf7da5ac0214bb882b59.tar.gz
prosody-def653fa2612573f537fdf7da5ac0214bb882b59.zip
stanza_router: Catch and log an error case which I don't think should happen (but sometimes seems to)
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 5bf437f9..4e3380e1 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -173,7 +173,10 @@ function core_route_stanza(origin, stanza)
core_post_stanza(origin, stanza);
elseif origin.type == "c2s" then
-- Remote host
- if not hosts[from_host].disallow_s2s then
+ if not hosts[from_host] then
+ log("error", "No hosts[from_host] (please report): %s", tostring(stanza));
+ end
+ if (not hosts[from_host]) or (not hosts[from_host].disallow_s2s) then
local xmlns = stanza.attr.xmlns;
--stanza.attr.xmlns = "jabber:server";
stanza.attr.xmlns = nil;