# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1275095291 -3600
# Node ID 94639081f327e5fd21f1ea5e6f1f5f9e111194ef
# Parent  b9ebd44a35f92f4371a00a2e970877552bec8b75
mod_compression: Update for new session.data() syntax, fixes invalid XML errors after compression negotiation (thanks hg bisect)

diff -r b9ebd44a35f9 -r 94639081f327 plugins/mod_compression.lua
--- a/plugins/mod_compression.lua	Sun May 09 20:48:21 2010 +0100
+++ b/plugins/mod_compression.lua	Sat May 29 02:08:11 2010 +0100
@@ -119,7 +119,7 @@
 -- setup decompression for a stream
 local function setup_decompression(session, inflate_stream)
 	local old_data = session.data
-	session.data = function(conn, data)
+	session.data = function(data)
 			local status, decompressed, eof = pcall(inflate_stream, data);
 			if status == false then
 				session:close({
@@ -130,7 +130,7 @@
 				module:log("warn", "%s", tostring(decompressed));
 				return;
 			end
-			old_data(conn, decompressed);
+			old_data(decompressed);
 		end;
 end