aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-25 03:30:00 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-25 03:30:00 +0000
commitc4742ed7810b3e10bfc6bdb55a11c31b3faf5426 (patch)
treec82d8b975badc525dafc48f4f6fde7a73553f61e
parentutil.datamanager: Replace popen(mkdir) with lfs.mkdir, keeping the just-in-time creation until we have the new datamanager API (diff)
downloadprosody-c4742ed7810b3e10bfc6bdb55a11c31b3faf5426.tar.xz
prosody-c4742ed7810b3e10bfc6bdb55a11c31b3faf5426.zip
s2smanager: Log warning when trying to send a stanza from a host we don't serve, instead of a traceback (thanks stpeter)
-rw-r--r--core/s2smanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 4c61eaa3f..20d932e8f 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -79,6 +79,10 @@ local function bounce_sendq(session)
end
function send_to_host(from_host, to_host, data)
+ if not hosts[from_host] then
+ log("warn", "Attempt to send stanza from %s - a host we don't serve", from_host);
+ return false;
+ end
local host = hosts[from_host].s2sout[to_host];
if host then
-- We have a connection to this host already