diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/xmppclient_listener.lua | 6 | ||||
-rw-r--r-- | net/xmppcomponent_listener.lua | 6 | ||||
-rw-r--r-- | net/xmppserver_listener.lua | 6 |
3 files changed, 9 insertions, 9 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 diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua index bee05967..c16f41a0 100644 --- a/net/xmppcomponent_listener.lua +++ b/net/xmppcomponent_listener.lua @@ -32,7 +32,7 @@ local xmlns_component = 'jabber:component:accept'; --- Callbacks/data for xmlhandlers to handle streams for us --- -local stream_callbacks = { stream_tag = "http://etherx.jabber.org/streams|stream", default_ns = xmlns_component }; +local stream_callbacks = { stream_tag = "http://etherx.jabber.org/streams\1stream", default_ns = xmlns_component }; function stream_callbacks.error(session, error, data, data2) log("warn", "Error processing component stream: "..tostring(error)); @@ -87,7 +87,7 @@ end --- Closing a component connection 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 @@ -138,7 +138,7 @@ function component_listener.listener(conn, data) session.log("info", "Incoming Jabber component connection"); - 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; diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index fa6acbb7..c7e02ec5 100644 --- a/net/xmppserver_listener.lua +++ b/net/xmppserver_listener.lua @@ -17,7 +17,7 @@ local s2s_streamopened = require "core.s2smanager".streamopened; local s2s_streamclosed = require "core.s2smanager".streamclosed; local s2s_destroy_session = require "core.s2smanager".destroy_session; local s2s_attempt_connect = require "core.s2smanager".attempt_connection; -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:server", streamopened = s2s_streamopened, streamclosed = s2s_streamclosed, handlestanza = core_process_stanza }; @@ -53,7 +53,7 @@ local xmppserver = { default_port = 5269, 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 @@ local function session_reset_stream(session) 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 |