Diff

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
parent 4482:722cf2680028
child 4484:0da4e0f0f0ef
line wrap: on
line diff
--- a/util/xmppstream.lua	Wed Jan 25 11:47:51 2012 +0500
+++ b/util/xmppstream.lua	Wed Jan 25 11:49:27 2012 +0500
@@ -140,16 +140,8 @@
 				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