aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-08-28 12:05:18 +0100
committerMatthew Wild <mwild1@gmail.com>2014-08-28 12:05:18 +0100
commit656d194bd1e0022605ab0a5b66da7ee2c5a3a1d3 (patch)
treef9b41c73e3cda1b1f3ffe63a3921967eea4a20d6 /plugins
parentbf66f0049f2e7682ed6354388db92a2b25ea67b6 (diff)
parent878efeecd5030048b33121b05c6cf402f860ca1d (diff)
downloadprosody-656d194bd1e0022605ab0a5b66da7ee2c5a3a1d3.tar.gz
prosody-656d194bd1e0022605ab0a5b66da7ee2c5a3a1d3.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_c2s.lua2
-rw-r--r--plugins/mod_compression.lua6
-rw-r--r--plugins/mod_posix.lua2
-rw-r--r--plugins/mod_s2s/mod_s2s.lua5
4 files changed, 12 insertions, 3 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index f0cdd7fb..bb3858c0 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -91,7 +91,7 @@ end
function stream_callbacks.error(session, error, data)
if error == "no-stream" then
- session.log("debug", "Invalid opening stream header");
+ session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}")));
session:close("invalid-namespace");
elseif error == "parse-error" then
(session.log or log)("debug", "Client XML parse error: %s", tostring(data));
diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua
index 969172fd..da55e5bb 100644
--- a/plugins/mod_compression.lua
+++ b/plugins/mod_compression.lua
@@ -147,6 +147,12 @@ module:hook("stanza/http://jabber.org/protocol/compress:compressed", function(ev
end
end);
+module:hook("stanza/http://jabber.org/protocol/compress:failure", function(event)
+ local err = event.stanza:get_child();
+ (event.origin.log or module._log)("warn", "Compression setup failed (%s)", err and err.name or "unknown reason");
+ return true;
+end);
+
module:hook("stanza/http://jabber.org/protocol/compress:compress", function(event)
local session, stanza = event.origin, event.stanza;
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua
index 89d6d2b6..c9b9f3aa 100644
--- a/plugins/mod_posix.lua
+++ b/plugins/mod_posix.lua
@@ -80,7 +80,7 @@ local function write_pidfile()
if pidfile_handle then
remove_pidfile();
end
- pidfile = module:get_option("pidfile");
+ pidfile = module:get_option_string("pidfile");
if pidfile then
local err;
local mode = stat(pidfile) and "r+" or "w+";
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