--- a/plugins/mod_compression.lua Sun Apr 28 02:28:42 2013 +0200
+++ b/plugins/mod_compression.lua Mon Apr 29 10:52:23 2013 +0100
@@ -141,7 +141,7 @@
-- setup decompression for session.data
setup_decompression(session, inflate_stream);
session:reset_stream();
- session:open_stream();
+ session:open_stream(session.from_host, session.to_host);
session.compressed = true;
return true;
end
--- a/plugins/mod_s2s/mod_s2s.lua Sun Apr 28 02:28:42 2013 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua Mon Apr 29 10:52:23 2013 +0100
@@ -348,7 +348,7 @@
end
end
- session:open_stream()
+ session:open_stream(session.to_host, session.from_host)
if session.version >= 1.0 then
local features = st.stanza("stream:features");
@@ -448,7 +448,11 @@
local log = session.log or log;
if session.conn then
if session.notopen then
- session:open_stream()
+ if session.direction == "incoming" then
+ session:open_stream(session.to_host, session.from_host);
+ else
+ session:open_stream(session.from_host, session.to_host);
+ end
end
if reason then -- nil == no err, initiated by us, false == initiated by remote
if type(reason) == "string" then -- assume stream error
@@ -496,8 +500,6 @@
end
function session_open_stream(session, from, to)
- local from = from or session.from_host;
- local to = to or session.to_host;
local attr = {
["xmlns:stream"] = 'http://etherx.jabber.org/streams',
xmlns = 'jabber:server',
@@ -506,8 +508,7 @@
id = session.streamid,
from = from, to = to,
}
- local local_host = session.direction == "outgoing" and from or to;
- if not local_host or (hosts[local_host] and hosts[local_host].modules.dialback) then
+ if not from or (hosts[from] and hosts[from].modules.dialback) then
attr["xmlns:db"] = 'jabber:server:dialback';
end
--- a/plugins/mod_saslauth.lua Sun Apr 28 02:28:42 2013 +0200
+++ b/plugins/mod_saslauth.lua Mon Apr 29 10:52:23 2013 +0100
@@ -87,7 +87,7 @@
module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host);
session.external_auth = "succeeded"
session:reset_stream();
- session:open_stream();
+ session:open_stream(session.from_host, session.to_host);
module:fire_event("s2s-authenticated", { session = session, host = session.to_host });
return true;
--- a/prosodyctl Sun Apr 28 02:28:42 2013 +0200
+++ b/prosodyctl Mon Apr 29 10:52:23 2013 +0100
@@ -654,7 +654,7 @@
function cert_commands.config(arg)
if #arg >= 1 and arg[1] ~= "--help" then
- local conf_filename = (CFG_DATADIR or ".") .. "/" .. arg[1] .. ".cnf";
+ local conf_filename = (CFG_DATADIR or "./certs") .. "/" .. arg[1] .. ".cnf";
if ask_overwrite(conf_filename) then
return nil, conf_filename;
end
@@ -687,7 +687,7 @@
function cert_commands.key(arg)
if #arg >= 1 and arg[1] ~= "--help" then
- local key_filename = (CFG_DATADIR or ".") .. "/" .. arg[1] .. ".key";
+ local key_filename = (CFG_DATADIR or "./certs") .. "/" .. arg[1] .. ".key";
if ask_overwrite(key_filename) then
return nil, key_filename;
end
@@ -709,7 +709,7 @@
function cert_commands.request(arg)
if #arg >= 1 and arg[1] ~= "--help" then
- local req_filename = (CFG_DATADIR or ".") .. "/" .. arg[1] .. ".req";
+ local req_filename = (CFG_DATADIR or "./certs") .. "/" .. arg[1] .. ".req";
if ask_overwrite(req_filename) then
return nil, req_filename;
end
@@ -727,7 +727,7 @@
function cert_commands.generate(arg)
if #arg >= 1 and arg[1] ~= "--help" then
- local cert_filename = (CFG_DATADIR or ".") .. "/" .. arg[1] .. ".crt";
+ local cert_filename = (CFG_DATADIR or "./certs") .. "/" .. arg[1] .. ".crt";
if ask_overwrite(cert_filename) then
return nil, cert_filename;
end