aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-04-02 11:05:41 +0100
committerMatthew Wild <mwild1@gmail.com>2014-04-02 11:05:41 +0100
commit25db6d9b02e590afc386930911be1e15fca36625 (patch)
tree3536f5876010c68c64675ad183809c87be9adf81
parentc7bbd4424cfb8237490c4f7d9c31f13dcb3ddc57 (diff)
downloadprosody-25db6d9b02e590afc386930911be1e15fca36625.tar.gz
prosody-25db6d9b02e590afc386930911be1e15fca36625.zip
util.xmppstream: Disable LuaExpat's buffering (if possible)
-rw-r--r--util/xmppstream.lua6
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 {