Diff

plugins/mod_c2s.lua @ 6383:ec8878113907

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 02 Sep 2014 22:34:32 +0200
parent 6382:57d23c26039b
child 6630:6735e2d735d6
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Sun Aug 31 20:33:47 2014 +0200
+++ b/plugins/mod_c2s.lua	Tue Sep 02 22:34:32 2014 +0200
@@ -240,9 +240,9 @@
 	function session.data(data)
 		-- Parse the data, which will store stanzas in session.pending_stanzas
 		if data then
-			data = filter("bytes/in", data);
-			if data then
-				local ok, err = stream:feed(data);
+		data = filter("bytes/in", data);
+		if data then
+			local ok, err = stream:feed(data);
 				if not ok then
 					log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_"));
 					session:close("not-well-formed");