aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-14 02:20:46 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-14 02:20:46 +0000
commit1b422e8f1d173e7f70db93cfec3ef499e0f9e37c (patch)
tree43a88d79fd4c7018f2c7ddb2a2afdac817f98332
parent9acd51fbef35196c355bf03a9d7751a064649d29 (diff)
downloadprosody-1b422e8f1d173e7f70db93cfec3ef499e0f9e37c.tar.gz
prosody-1b422e8f1d173e7f70db93cfec3ef499e0f9e37c.zip
Fix for detecting when we are routing a stanza to ourself (I'm sure this has something to do with you, waqas...)
-rw-r--r--core/s2smanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index e0a6f3ca..16092ba8 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -4,6 +4,7 @@ local sessions = sessions;
local socket = require "socket";
local format = string.format;
local t_insert = table.insert;
+local get_traceback = debug.traceback;
local tostring, pairs, ipairs, getmetatable, print, newproxy, error, tonumber
= tostring, pairs, ipairs, getmetatable, print, newproxy, error, tonumber;
@@ -44,6 +45,9 @@ function send_to_host(from_host, to_host, data)
-- Queue stanza until we are able to send it
if host.sendq then t_insert(host.sendq, data);
else host.sendq = { data }; end
+ elseif host.type == "local" or host.type == "component" then
+ log("error", "Trying to send a stanza to ourselves??")
+ log("error", "Traceback: "..get_traceback());
else
(host.log or log)("debug", "going to send stanza to "..to_host.." from "..from_host);
-- FIXME