# HG changeset patch # User Matthew Wild # Date 1226629246 0 # Node ID 43a9683bcd1958e7f1feeab39b157655f2938f3a # Parent 6eb3dea1d68b109478c74c7876de861be7c8d1e1 Fix for detecting when we are routing a stanza to ourself (I'm sure this has something to do with you, waqas...) diff -r 6eb3dea1d68b -r 43a9683bcd19 core/s2smanager.lua --- a/core/s2smanager.lua Fri Nov 14 02:12:08 2008 +0000 +++ b/core/s2smanager.lua Fri Nov 14 02:20:46 2008 +0000 @@ -4,6 +4,7 @@ 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 @@ -- 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