Software /
code /
prosody
Diff
core/s2smanager.lua @ 255:43a9683bcd19
Fix for detecting when we are routing a stanza to ourself (I'm sure this has something to do with you, waqas...)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 02:20:46 +0000 |
parent | 254:6eb3dea1d68b |
child | 256:c14ddd0912a2 |
line wrap: on
line diff
--- 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