Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 6367:769a3577dd85
Merge 0.9->0.10
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 28 Aug 2014 09:23:24 +0100 |
parent | 6337:925aceee8280 |
parent | 6364:4e93e8768c36 |
child | 6382:57d23c26039b |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Wed Aug 27 13:00:04 2014 +0200 +++ b/plugins/mod_s2s/mod_s2s.lua Thu Aug 28 09:23:24 2014 +0100 @@ -347,7 +347,9 @@ log("debug", "Sending stream features: %s", tostring(features)); send(features); end + session.notopen = nil; elseif session.direction == "outgoing" then + session.notopen = nil; -- If we are just using the connection for verifying dialback keys, we won't try and auth it if not attr.id then error("stream response did not give us a streamid!!!"); end session.streamid = attr.id; @@ -381,7 +383,6 @@ end end end - session.notopen = nil; end function stream_callbacks.streamclosed(session) @@ -391,6 +392,7 @@ function stream_callbacks.error(session, error, data) if error == "no-stream" then + session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}"))); session:close("invalid-namespace"); elseif error == "parse-error" then session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); @@ -501,6 +503,7 @@ function session.reset_stream() session.notopen = true; + session.streamid = nil; session.stream:reset(); end