Software /
code /
prosody
Comparison
core/xmlhandlers.lua @ 1155:a93b25f1528e
xmlhandlers: Removed another unnecessary check
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 15 May 2009 07:51:33 +0500 |
parent | 1154:570c0427fcb8 |
child | 1414:6f653b8beac9 |
comparison
equal
deleted
inserted
replaced
1154:570c0427fcb8 | 1155:a93b25f1528e |
---|---|
118 cb_error(session, "stream-error", stanza); | 118 cb_error(session, "stream-error", stanza); |
119 else | 119 else |
120 cb_error(session, "parse-error", "unexpected-element-close", name); | 120 cb_error(session, "parse-error", "unexpected-element-close", name); |
121 end | 121 end |
122 end | 122 end |
123 if stanza then | 123 if #chardata > 0 then |
124 if #chardata > 0 then | 124 -- We have some character data in the buffer |
125 -- We have some character data in the buffer | 125 stanza:text(t_concat(chardata)); |
126 stanza:text(t_concat(chardata)); | 126 chardata = {}; |
127 chardata = {}; | 127 end |
128 end | 128 -- Complete stanza |
129 -- Complete stanza | 129 if #stanza.last_add == 0 then |
130 if #stanza.last_add == 0 then | 130 cb_handlestanza(session, stanza); |
131 cb_handlestanza(session, stanza); | 131 stanza = nil; |
132 stanza = nil; | 132 else |
133 else | 133 stanza:up(); |
134 stanza:up(); | |
135 end | |
136 end | 134 end |
137 end | 135 end |
138 return xml_handlers; | 136 return xml_handlers; |
139 end | 137 end |
140 | 138 |