Software / code / prosody
Comparison
core/xmlhandlers.lua @ 862:b3b80ccddb0c
Merged with main tip.
| author | Tobias Markmann <tm@ayena.de> |
|---|---|
| date | Tue, 03 Mar 2009 17:48:04 +0100 |
| parent | 844:503ca8da1000 |
| child | 896:2c0b9e3c11c3 |
comparison
equal
deleted
inserted
replaced
| 861:2a5373897128 | 862:b3b80ccddb0c |
|---|---|
| 119 cb_error(session, "stream-error", stanza); | 119 cb_error(session, "stream-error", stanza); |
| 120 else | 120 else |
| 121 cb_error(session, "parse-error", "unexpected-element-close", name); | 121 cb_error(session, "parse-error", "unexpected-element-close", name); |
| 122 end | 122 end |
| 123 end | 123 end |
| 124 if stanza and #chardata > 0 then | 124 if stanza then |
| 125 -- We have some character data in the buffer | 125 if #chardata > 0 then |
| 126 stanza:text(t_concat(chardata)); | 126 -- We have some character data in the buffer |
| 127 chardata = {}; | 127 stanza:text(t_concat(chardata)); |
| 128 end | 128 chardata = {}; |
| 129 -- Complete stanza | 129 end |
| 130 if #stanza.last_add == 0 then | 130 -- Complete stanza |
| 131 cb_handlestanza(session, stanza); | 131 if #stanza.last_add == 0 then |
| 132 stanza = nil; | 132 cb_handlestanza(session, stanza); |
| 133 else | 133 stanza = nil; |
| 134 stanza:up(); | 134 else |
| 135 stanza:up(); | |
| 136 end | |
| 135 end | 137 end |
| 136 end | 138 end |
| 137 return xml_handlers; | 139 return xml_handlers; |
| 138 end | 140 end |
| 139 | 141 |