From 36936e4b059694ccc4e4f9d9e2d63c0aec24bf60 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 25 Jan 2012 11:49:27 +0500 Subject: util.xmppstream: Have faith in the XML parser matching start and end tags. --- util/xmppstream.lua | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/util/xmppstream.lua b/util/xmppstream.lua index adf4a359..09198f21 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -140,16 +140,8 @@ function new_sax_handlers(session, stream_callbacks) stanza = t_remove(stack); end else - if tagname == stream_tag then - if cb_streamclosed then - cb_streamclosed(session); - end - else - local curr_ns,name = tagname:match(ns_pattern); - if name == "" then - curr_ns, name = "", curr_ns; - end - cb_error(session, "parse-error", "unexpected-element-close", name); + if cb_streamclosed then + cb_streamclosed(session); end end end -- cgit v1.2.3