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
commit507456f8836ce073df49d7e7bcb5dcab325a20e0 (patch)
tree3536f5876010c68c64675ad183809c87be9adf81
parent9abb4eb9dc5002a072e1c0d657b61ba618557d4e (diff)
downloadprosody-507456f8836ce073df49d7e7bcb5dcab325a20e0.tar.gz
prosody-507456f8836ce073df49d7e7bcb5dcab325a20e0.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 {