Changeset

1155:a93b25f1528e

xmlhandlers: Removed another unnecessary check
author Waqas Hussain <waqas20@gmail.com>
date Fri, 15 May 2009 07:51:33 +0500
parents 1154:570c0427fcb8
children 1156:14f3eb0e7787
files core/xmlhandlers.lua
diffstat 1 files changed, 11 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/core/xmlhandlers.lua	Fri May 15 07:27:03 2009 +0500
+++ b/core/xmlhandlers.lua	Fri May 15 07:51:33 2009 +0500
@@ -120,19 +120,17 @@
 					cb_error(session, "parse-error", "unexpected-element-close", name);
 				end
 			end
-			if stanza then
-				if #chardata > 0 then
-					-- We have some character data in the buffer
-					stanza:text(t_concat(chardata));
-					chardata = {};
-				end
-				-- Complete stanza
-				if #stanza.last_add == 0 then
-					cb_handlestanza(session, stanza);
-					stanza = nil;
-				else
-					stanza:up();
-				end
+			if #chardata > 0 then
+				-- We have some character data in the buffer
+				stanza:text(t_concat(chardata));
+				chardata = {};
+			end
+			-- Complete stanza
+			if #stanza.last_add == 0 then
+				cb_handlestanza(session, stanza);
+				stanza = nil;
+			else
+				stanza:up();
 			end
 		end
 	return xml_handlers;