Changeset

6052:ce3244c084f9

util.xmppstream: Disable LuaExpat's buffering (if possible)
author Matthew Wild <mwild1@gmail.com>
date Wed, 02 Apr 2014 11:05:41 +0100
parents 6051:46b4af3cf5ce
children 6053:2f93a04564b2
files util/xmppstream.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/util/xmppstream.lua	Tue Apr 01 16:50:15 2014 +0100
+++ b/util/xmppstream.lua	Wed Apr 02 11:05:41 2014 +0100
@@ -157,11 +157,11 @@
 	function xml_handlers:CharacterData(data)
 		if stanza then
 			if lxp_supports_bytecount then
-				stanza_size = stanza_size + #data --self:getcurrentbytecount();
+				stanza_size = stanza_size + self:getcurrentbytecount();
 			end
 			t_insert(chardata, data);
 		elseif lxp_supports_bytecount then
-			cb_handleprogress(#data--[[self:getcurrentbytecount()]]);
+			cb_handleprogress(self:getcurrentbytecount());
 		end
 	end
 	function xml_handlers:EndElement(tagname)
@@ -238,7 +238,7 @@
 	end
 
 	local handlers, meta = new_sax_handlers(session, stream_callbacks, handle_progress);
-	local parser = new_parser(handlers, ns_separator);
+	local parser = new_parser(handlers, ns_separator, false);
 	local parse = parser.parse;
 
 	return {