Software /
code /
prosody
Changeset
2470:2c3f05c01d7c
net.xmppserver_listener: Extend session:close() with a remote_reason parameter
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 19 Jan 2010 04:37:28 +0000 |
parents | 2469:9e0c0b08f219 |
children | 2471:2aeb55a51f47 |
files | net/xmppserver_listener.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/xmppserver_listener.lua Tue Jan 19 04:35:10 2010 +0000 +++ b/net/xmppserver_listener.lua Tue Jan 19 04:37:28 2010 +0000 @@ -70,7 +70,7 @@ 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 @@ 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