Software /
code /
prosody
Changeset
959:e3db909065f2
sessionmanager, s2smanager, mod_component: Send reply </stream:stream> when client closes stream
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Apr 2009 20:06:39 +0100 |
parents | 958:172fb9a73017 |
children | 960:6bc16062da6c 966:d2692d427496 |
files | core/s2smanager.lua core/sessionmanager.lua plugins/mod_component.lua |
diffstat | 3 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/s2smanager.lua Sun Apr 05 19:42:56 2009 +0100 +++ b/core/s2smanager.lua Sun Apr 05 20:06:39 2009 +0100 @@ -244,6 +244,11 @@ session.notopen = nil; end +function streamclosed(session) + session.send("</stream:stream>"); + session.notopen = true; +end + function initiate_dialback(session) -- generate dialback key session.dialback_key = generate_dialback(session.streamid, session.to_host, session.from_host);
--- a/core/sessionmanager.lua Sun Apr 05 19:42:56 2009 +0100 +++ b/core/sessionmanager.lua Sun Apr 05 20:06:39 2009 +0100 @@ -182,6 +182,11 @@ session.notopen = nil; end +function streamclosed(session) + session.send("</stream:stream>"); + session.notopen = true; +end + function send_to_available_resources(user, host, stanza) local count = 0; local to = stanza.attr.to;
--- a/plugins/mod_component.lua Sun Apr 05 19:42:56 2009 +0100 +++ b/plugins/mod_component.lua Sun Apr 05 20:06:39 2009 +0100 @@ -69,6 +69,8 @@ end function stream_callbacks.streamclosed(session) + session.send("</stream:stream>"); + session.notopen = true; end local core_process_stanza = core_process_stanza;