Changeset

3927:1b57e83266f0

util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Dec 2010 14:44:13 +0000 (2010-12-21)
parents 3926:e76285349ba3
children 3928:4dfb345e33ec
files util/xmppstream.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/xmppstream.lua	Tue Dec 21 05:05:20 2010 +0000
+++ b/util/xmppstream.lua	Tue Dec 21 14:44:13 2010 +0000
@@ -45,7 +45,10 @@
 	local cb_handlestanza = stream_callbacks.handlestanza;
 	
 	local stream_ns = stream_callbacks.stream_ns or xmlns_streams;
-	local stream_tag = stream_ns..ns_separator..(stream_callbacks.stream_tag or "stream");
+	local stream_tag = stream_callbacks.stream_tag or "stream";
+	if stream_ns ~= "" then
+		stream_tag = stream_ns..ns_separator..stream_tag;
+	end
 	local stream_error_tag = stream_ns..ns_separator..(stream_callbacks.error_tag or "error");
 	
 	local stream_default_ns = stream_callbacks.default_ns;