Mercurial > prosody-hg
comparison util/xmppstream.lua @ 4483:1dbd06eedaa4
util.xmppstream: Have faith in the XML parser matching start and end tags.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Wed, 25 Jan 2012 11:49:27 +0500 |
| parents | 722cf2680028 |
| children | 0da4e0f0f0ef |
comparison
equal
deleted
inserted
replaced
| 4482:722cf2680028 | 4483:1dbd06eedaa4 |
|---|---|
| 138 stanza = nil; | 138 stanza = nil; |
| 139 else | 139 else |
| 140 stanza = t_remove(stack); | 140 stanza = t_remove(stack); |
| 141 end | 141 end |
| 142 else | 142 else |
| 143 if tagname == stream_tag then | 143 if cb_streamclosed then |
| 144 if cb_streamclosed then | 144 cb_streamclosed(session); |
| 145 cb_streamclosed(session); | |
| 146 end | |
| 147 else | |
| 148 local curr_ns,name = tagname:match(ns_pattern); | |
| 149 if name == "" then | |
| 150 curr_ns, name = "", curr_ns; | |
| 151 end | |
| 152 cb_error(session, "parse-error", "unexpected-element-close", name); | |
| 153 end | 145 end |
| 154 end | 146 end |
| 155 end | 147 end |
| 156 | 148 |
| 157 local function restricted_handler(parser) | 149 local function restricted_handler(parser) |
