Merge 0.10->trunk
authorMatthew Wild <mwild1@gmail.com>
Tue, 14 Oct 2014 10:59:54 +0100
changeset 6477 ee13d7dfa988
parent 6472 93ffe59a9546 (current diff)
parent 6476 7c8f58d2b331 (diff)
child 6478 3c815a64042b
Merge 0.10->trunk
--- a/plugins/mod_pubsub/pubsub.lib.lua	Wed Oct 08 18:47:01 2014 -0400
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Tue Oct 14 10:59:54 2014 +0100
@@ -18,7 +18,7 @@
 	["nodeid-required"] = { "modify", "bad-request", nil, "nodeid-required" };
 	["item-not-found"] = { "cancel", "item-not-found" };
 	["not-subscribed"] = { "modify", "unexpected-request", nil, "not-subscribed" };
-	["forbidden"] = { "cancel", "forbidden" };
+	["forbidden"] = { "auth", "forbidden" };
 	["not-allowed"] = { "cancel", "not-allowed" };
 };
 local function pubsub_error_reply(stanza, error)
--- a/plugins/mod_s2s/mod_s2s.lua	Wed Oct 08 18:47:01 2014 -0400
+++ b/plugins/mod_s2s/mod_s2s.lua	Tue Oct 14 10:59:54 2014 +0100
@@ -47,7 +47,7 @@
 local function bounce_sendq(session, reason)
 	local sendq = session.sendq;
 	if not sendq then return; end
-	session.log("info", "sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host));
+	session.log("info", "Sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host));
 	local dummy = {
 		type = "s2sin";
 		send = function(s)
--- a/prosody	Wed Oct 08 18:47:01 2014 -0400
+++ b/prosody	Tue Oct 14 10:59:54 2014 +0100
@@ -151,13 +151,11 @@
 	-- for neat sandboxing of modules
 	local _realG = _G;
 	local _real_require = require;
-	if not getfenv then
+	local getfenv = getfenv or function (f)
 		-- FIXME: This is a hack to replace getfenv() in Lua 5.2
-		function getfenv(f)
-			local name, env = debug.getupvalue(debug.getinfo(f or 1).func, 1);
-			if name == "_ENV" then
-				return env;
-			end
+		local name, env = debug.getupvalue(debug.getinfo(f or 1).func, 1);
+		if name == "_ENV" then
+			return env;
 		end
 	end
 	function require(...)