# HG changeset patch # User Matthew Wild # Date 1396433141 -3600 # Node ID ce3244c084f9a1462db3986c5277aee37794e1a4 # Parent 46b4af3cf5ce8150c66c3d0ed490385d15c12d11 util.xmppstream: Disable LuaExpat's buffering (if possible) diff -r 46b4af3cf5ce -r ce3244c084f9 util/xmppstream.lua --- 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 {