aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s/mod_s2s.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-08-28 09:23:24 +0100
committerMatthew Wild <mwild1@gmail.com>2014-08-28 09:23:24 +0100
commit878efeecd5030048b33121b05c6cf402f860ca1d (patch)
tree29a8b368a2ebd36175100726d9d02b82b27edc8c /plugins/mod_s2s/mod_s2s.lua
parent6007de18c4db1acae2bb17c9d2aaad3b1ef994f5 (diff)
parentb27e7b3834519214f9b3c9e6e041421429bbcc74 (diff)
downloadprosody-878efeecd5030048b33121b05c6cf402f860ca1d.tar.gz
prosody-878efeecd5030048b33121b05c6cf402f860ca1d.zip
Merge 0.9->0.10
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index f177bf82..8614b857 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -347,7 +347,9 @@ function stream_callbacks.streamopened(session, attr)
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 @@ function stream_callbacks.streamopened(session, attr)
end
end
end
- session.notopen = nil;
end
function stream_callbacks.streamclosed(session)
@@ -391,6 +392,7 @@ end
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 @@ local function initialize_session(session)
function session.reset_stream()
session.notopen = true;
+ session.streamid = nil;
session.stream:reset();
end