diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-04-02 11:05:41 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-04-02 11:05:41 +0100 |
commit | 7502919e90b67e4ac7370fa09b32ca7d87b81c75 (patch) | |
tree | 3536f5876010c68c64675ad183809c87be9adf81 | |
parent | cedc3cb7f2426ac2cc34f17fd50f92da4516f597 (diff) | |
download | prosody-7502919e90b67e4ac7370fa09b32ca7d87b81c75.tar.gz prosody-7502919e90b67e4ac7370fa09b32ca7d87b81c75.zip |
util.xmppstream: Disable LuaExpat's buffering (if possible)
-rw-r--r-- | util/xmppstream.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |