Changeset

3431:c499f4752cd8

s2smanager: Only bounce real stanzas on s2s failure, not dialback and friends (thanks elghinn)
author Matthew Wild <mwild1@gmail.com>
date Tue, 03 Aug 2010 09:39:05 +0100
parents 3430:970690b3cb28
children 3432:7f3e45955725
files core/s2smanager.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Mon Aug 02 20:11:08 2010 +0500
+++ b/core/s2smanager.lua	Tue Aug 03 09:39:05 2010 +0100
@@ -57,6 +57,7 @@
 	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 @@
 		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();