diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-11-12 13:42:44 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-11-12 13:42:44 +0500 |
commit | 316bc45e71aa55d276b11986115d5e40661bd607 (patch) | |
tree | eae786040e13eb74d13aaf41e66d3f3f9b8b8e8f /net/xmppclient_listener.lua | |
parent | 41079afbb43ebd56b5aa5cc43da2e84120c0b012 (diff) | |
download | prosody-316bc45e71aa55d276b11986115d5e40661bd607.tar.gz prosody-316bc45e71aa55d276b11986115d5e40661bd607.zip |
Changed separator between attribute names and prefixes from '|' to '\1' (optimization and cleanup).
Diffstat (limited to 'net/xmppclient_listener.lua')
-rw-r--r-- | net/xmppclient_listener.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index 6cea43f2..417dfd4a 100644 --- a/net/xmppclient_listener.lua +++ b/net/xmppclient_listener.lua @@ -27,7 +27,7 @@ local sm_streamopened = sessionmanager.streamopened; local sm_streamclosed = sessionmanager.streamclosed; local st = require "util.stanza"; -local stream_callbacks = { stream_tag = "http://etherx.jabber.org/streams|stream", +local stream_callbacks = { stream_tag = "http://etherx.jabber.org/streams\1stream", default_ns = "jabber:client", streamopened = sm_streamopened, streamclosed = sm_streamclosed, handlestanza = core_process_stanza }; @@ -53,7 +53,7 @@ local xmppclient = { default_port = 5222, default_mode = "*a" }; local function session_reset_stream(session) -- Reset stream - local parser = lxp.new(init_xmlhandlers(session, stream_callbacks), "|"); + local parser = lxp.new(init_xmlhandlers(session, stream_callbacks), "\1"); session.parser = parser; session.notopen = true; @@ -70,7 +70,7 @@ end local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; -local default_stream_attr = { ["xmlns:stream"] = stream_callbacks.stream_tag:gsub("%|[^|]+$", ""), xmlns = stream_callbacks.default_ns, version = "1.0", id = "" }; +local default_stream_attr = { ["xmlns:stream"] = stream_callbacks.stream_tag:match("[^\1]*"), xmlns = stream_callbacks.default_ns, version = "1.0", id = "" }; local function session_close(session, reason) local log = session.log or log; if session.conn then |