From def653fa2612573f537fdf7da5ac0214bb882b59 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 10 Jul 2009 02:50:57 +0100 Subject: stanza_router: Catch and log an error case which I don't think should happen (but sometimes seems to) --- core/stanza_router.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3