modulemanager: Don't close stream on stream:error with unsupported-stanza-type (fixes #102)

Mon, 29 Jun 2009 15:26:04 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Mon, 29 Jun 2009 15:26:04 +0500
changeset 1447
cc20d6dfa32d
parent 1446
109ca9e7a6f3
child 1448
700ea94e1769

modulemanager: Don't close stream on stream:error with unsupported-stanza-type (fixes #102)

core/modulemanager.lua file | annotate | diff | comparison | revisions
--- a/core/modulemanager.lua	Mon Jun 29 15:20:26 2009 +0500
+++ b/core/modulemanager.lua	Mon Jun 29 15:26:04 2009 +0500
@@ -257,7 +257,7 @@
 			if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
 				origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 			end
-		elseif not(name == "features" and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features
+		elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features
 			origin:close("unsupported-stanza-type");
 		end
 	end

mercurial