core/xmlhandlers.lua
changeset 334 bffd80e8c7a3
parent 331 830fd67f9378
child 341 a9e02b5c58d2
equal deleted inserted replaced
333:8d15b073fdbe 334:bffd80e8c7a3
    94 				t_insert(chardata, data);
    94 				t_insert(chardata, data);
    95 			end
    95 			end
    96 		end
    96 		end
    97 		function xml_handlers:EndElement(name)
    97 		function xml_handlers:EndElement(name)
    98 			curr_ns,name = name:match("^(.+)|([%w%-]+)$");
    98 			curr_ns,name = name:match("^(.+)|([%w%-]+)$");
    99 			if (not stanza) or #stanza.last_add < 0 or (#stanza.last_add > 0 and name ~= stanza.last_add[#stanza.last_add].name) then 
    99 			if (not stanza) or (#stanza.last_add > 0 and name ~= stanza.last_add[#stanza.last_add].name) then 
   100 				if name == "stream" and cb_streamclosed then
   100 				if name == "stream" and cb_streamclosed then
   101 					log("debug", "Stream closed");
   101 					log("debug", "Stream closed");
   102 					cb_streamclosed(session);
   102 					cb_streamclosed(session);
   103 					return;
   103 					return;
   104 				elseif name == "error" then
   104 				elseif name == "error" then