From 25db6d9b02e590afc386930911be1e15fca36625 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 2 Apr 2014 11:05:41 +0100 Subject: util.xmppstream: Disable LuaExpat's buffering (if possible) --- util/xmppstream.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/xmppstream.lua') diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 9cdd6471..a25891a9 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -157,11 +157,11 @@ function new_sax_handlers(session, stream_callbacks, cb_handleprogress) 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 @@ function new(session, stream_callbacks, stanza_size_limit) 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 { -- cgit v1.2.3