From 02f918526ba00028322427c13aacf98546e134a5 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 3 Aug 2010 09:39:05 +0100 Subject: s2smanager: Only bounce real stanzas on s2s failure, not dialback and friends (thanks elghinn) --- core/s2smanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core') 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(); -- cgit v1.2.3