aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-08-03 09:39:05 +0100
committerMatthew Wild <mwild1@gmail.com>2010-08-03 09:39:05 +0100
commit02f918526ba00028322427c13aacf98546e134a5 (patch)
tree256a7e9254f6e1611dfc9d31fbc12d6d791fedee
parentd6cf6f600495c810fddf4a06711fb46e6ce60bea (diff)
downloadprosody-02f918526ba00028322427c13aacf98546e134a5.tar.gz
prosody-02f918526ba00028322427c13aacf98546e134a5.zip
s2smanager: Only bounce real stanzas on s2s failure, not dialback and friends (thanks elghinn)
-rw-r--r--core/s2smanager.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index e5fb699b..dea65e6a 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -57,6 +57,7 @@ function compare_srv_priorities(a,b)
return a.priority < b.priority or (a.priority == b.priority and a.weight > b.weight);
end
+local bouncy_stanzas = { message = true, presence = true, iq = true };
local function bounce_sendq(session, reason)
local sendq = session.sendq;
if sendq then
@@ -71,7 +72,7 @@ local function bounce_sendq(session, reason)
for i, data in ipairs(sendq) do
local reply = data[2];
local xmlns = reply.attr.xmlns;
- if not xmlns then
+ if not xmlns and bouncy_stanzas[reply.name] then
reply.attr.type = "error";
reply:tag("error", {type = "cancel"})
:tag("remote-server-not-found", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}):up();