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 |