diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-01-19 04:37:28 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-01-19 04:37:28 +0000 |
commit | 7404385817009bcffd56c8aa8f91ac14ea8fc53b (patch) | |
tree | 475ac50805e1b2f459a41616daee461fb09d2ee7 | |
parent | c29137a1b11bdda5ec1406a2fc5de613500a02ca (diff) | |
download | prosody-7404385817009bcffd56c8aa8f91ac14ea8fc53b.tar.gz prosody-7404385817009bcffd56c8aa8f91ac14ea8fc53b.zip |
net.xmppserver_listener: Extend session:close() with a remote_reason parameter
-rw-r--r-- | net/xmppserver_listener.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index 5198a764..3def46b5 100644 --- a/net/xmppserver_listener.lua +++ b/net/xmppserver_listener.lua @@ -70,7 +70,7 @@ end local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; local default_stream_attr = { ["xmlns:stream"] = "http://etherx.jabber.org/streams", xmlns = stream_callbacks.default_ns, version = "1.0", id = "" }; -local function session_close(session, reason) +local function session_close(session, reason, remote_reason) local log = session.log or log; if session.conn then if session.notopen then @@ -103,7 +103,7 @@ local function session_close(session, reason) session.conn:close(true); -- Force FIXME: timer? end session.conn:close(); - xmppserver.ondisconnect(session.conn, (reason and (reason.text or reason.condition)) or reason or "stream closed"); + xmppserver.ondisconnect(session.conn, remote_reason or (reason and (reason.text or reason.condition)) or reason or "stream closed"); end end |