core/xmlhandlers.lua

changeset 3638
6f58a3063c14
parent 3540
bc139431830b
equal deleted inserted replaced
3637:bd491def3efb 3638:6f58a3063c14
112 -- We have some character data in the buffer 112 -- We have some character data in the buffer
113 stanza:text(t_concat(chardata)); 113 stanza:text(t_concat(chardata));
114 chardata = {}; 114 chardata = {};
115 end 115 end
116 -- Complete stanza 116 -- Complete stanza
117 if #stanza.last_add == 0 then 117 local last_add = stanza.last_add;
118 if not last_add or #last_add == 0 then
118 if tagname ~= stream_error_tag then 119 if tagname ~= stream_error_tag then
119 cb_handlestanza(session, stanza); 120 cb_handlestanza(session, stanza);
120 else 121 else
121 cb_error(session, "stream-error", stanza); 122 cb_error(session, "stream-error", stanza);
122 end 123 end

mercurial