Software /
code /
prosody
Changeset
4012:a4f8e226bc4a
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 |
parents | 3925:65c666d18096 |
children | 4013:d43177026cda |
files | util/xmppstream.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/xmppstream.lua Tue Dec 21 01:47:49 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;