diff -r 570c0427fcb8 -r a93b25f1528e core/xmlhandlers.lua --- a/core/xmlhandlers.lua Fri May 15 07:27:03 2009 +0500 +++ b/core/xmlhandlers.lua Fri May 15 07:51:33 2009 +0500 @@ -120,19 +120,17 @@ cb_error(session, "parse-error", "unexpected-element-close", name); end end - if stanza then - if #chardata > 0 then - -- We have some character data in the buffer - stanza:text(t_concat(chardata)); - chardata = {}; - end - -- Complete stanza - if #stanza.last_add == 0 then - cb_handlestanza(session, stanza); - stanza = nil; - else - stanza:up(); - end + if #chardata > 0 then + -- We have some character data in the buffer + stanza:text(t_concat(chardata)); + chardata = {}; + end + -- Complete stanza + if #stanza.last_add == 0 then + cb_handlestanza(session, stanza); + stanza = nil; + else + stanza:up(); end end return xml_handlers;