util/dependencies.lua

changeset 3904
f93163081b3c
parent 2925
692b3c6c5bd2
--- a/util/dependencies.lua	Sun Dec 19 20:28:58 2010 +0500
+++ b/util/dependencies.lua	Mon Dec 20 14:06:16 2010 +0000
@@ -78,11 +78,6 @@
 				["luarocks"] = "luarocks install luasec";
 				["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/";
 			}, "SSL/TLS support will not be available");
-	else
-		local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)");
-		if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then
-			log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends");
-		end
 	end
 	
 	local encodings, err = softreq "util.encodings"
@@ -121,5 +116,13 @@
 	return not fatal;
 end
 
+function log_warnings()
+	if ssl then
+		local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)");
+		if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then
+			log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends");
+		end
+	end
+end
 
 return _M;

mercurial