Diff

plugins/mod_compression.lua @ 3223:ee2dabe699c9

mod_compression: Remove the unneccessary stream:reset() overloading, which was causing double decompression and c2s/s2s failures
author Matthew Wild <mwild1@gmail.com>
date Thu, 10 Jun 2010 01:55:32 +0100
parent 3202:1a8a5b89a5ad
child 3226:69e920d7c968
line wrap: on
line diff
--- a/plugins/mod_compression.lua	Thu Jun 10 03:54:22 2010 +0500
+++ b/plugins/mod_compression.lua	Thu Jun 10 01:55:32 2010 +0100
@@ -142,12 +142,6 @@
 				
 			-- setup decompression for session.data
 			setup_decompression(session, inflate_stream);
-			local session_reset_stream = session.reset_stream;
-			session.reset_stream = function(session)
-					session_reset_stream(session);
-					setup_decompression(session, inflate_stream);
-					return true;
-				end;
 			session:reset_stream();
 			local default_stream_attr = {xmlns = "jabber:server", ["xmlns:stream"] = "http://etherx.jabber.org/streams",
 										["xmlns:db"] = 'jabber:server:dialback', version = "1.0", to = session.to_host, from = session.from_host};
@@ -189,12 +183,6 @@
 				-- setup decompression for session.data
 				setup_decompression(session, inflate_stream);
 				
-				local session_reset_stream = session.reset_stream;
-				session.reset_stream = function(session)
-						session_reset_stream(session);
-						setup_decompression(session, inflate_stream);
-						return true;
-					end;
 				session.compressed = true;
 			elseif method then
 				session.log("debug", "%s compression selected, but we don't support it.", tostring(method));