--- a/plugins/mod_bosh.lua Sun Jun 05 23:55:16 2011 +0100
+++ b/plugins/mod_bosh.lua Tue Jun 07 01:29:34 2011 +0100
@@ -125,11 +125,11 @@
local session = sessions[request.sid];
if session then
- -- Session was marked as inactive, since we have
- -- a request open now, unmark it
- if inactive_sessions[session] then
- inactive_sessions[session] = nil;
- end
+ -- Session was marked as inactive, since we have
+ -- a request open now, unmark it
+ if inactive_sessions[session] and #session.requests > 0 then
+ inactive_sessions[session] = nil;
+ end
local r = session.requests;
log("debug", "Session %s has %d out of %d requests open", request.sid, #r, session.bosh_hold);
--- a/plugins/mod_dialback.lua Sun Jun 05 23:55:16 2011 +0100
+++ b/plugins/mod_dialback.lua Tue Jun 07 01:29:34 2011 +0100
@@ -60,7 +60,7 @@
return true;
end
- dialback_requests[attr.from] = origin;
+ dialback_requests[attr.from.."/"..origin.streamid] = origin;
if not origin.from_host then
-- Just used for friendlier logging
@@ -83,8 +83,8 @@
if origin.type == "s2sout_unauthed" or origin.type == "s2sout" then
local attr = stanza.attr;
- local dialback_verifying = dialback_requests[attr.from];
- if dialback_verifying then
+ local dialback_verifying = dialback_requests[attr.from.."/"..(attr.id or "")];
+ if dialback_verifying and attr.from == origin.to_host then
local valid;
if attr.type == "valid" then
s2s_make_authenticated(dialback_verifying, attr.from);
@@ -101,7 +101,7 @@
st.stanza("db:result", { from = attr.to, to = attr.from, id = attr.id, type = valid })
:text(dialback_verifying.hosts[attr.from].dialback_key));
end
- dialback_requests[attr.from] = nil;
+ dialback_requests[attr.from.."/"..(attr.id or "")] = nil;
end
return true;
end
--- a/plugins/mod_storage_sql.lua Sun Jun 05 23:55:16 2011 +0100
+++ b/plugins/mod_storage_sql.lua Tue Jun 07 01:29:34 2011 +0100
@@ -93,7 +93,7 @@
if not(ok and commit_ok) then
module:log("warn", "Failed to create index (%s), lookups may not be optimised", err or commit_err);
end
- else -- COMPAT: Upgrade tables from 0.8.0
+ elseif params.driver == "MySQL" then -- COMPAT: Upgrade tables from 0.8.0
-- Failed to create, but check existing MySQL table here
local stmt = connection:prepare("SHOW COLUMNS FROM prosody WHERE Field='value' and Type='text'");
local ok = stmt:execute();
--- a/tools/migration/migrator/prosody_sql.lua Sun Jun 05 23:55:16 2011 +0100
+++ b/tools/migration/migrator/prosody_sql.lua Tue Jun 07 01:29:34 2011 +0100
@@ -42,7 +42,7 @@
ok, err = assert(stmt:execute());
commit_ok, commit_err = assert(connection:commit());
end
- else -- COMPAT: Upgrade tables from 0.8.0
+ elseif params.driver == "MySQL" then -- COMPAT: Upgrade tables from 0.8.0
-- Failed to create, but check existing MySQL table here
local stmt = connection:prepare("SHOW COLUMNS FROM prosody WHERE Field='value' and Type='text'");
local ok = stmt:execute();