X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fdependencies.lua;h=9371521caeca1817320af115c5d2160639b05ec2;hb=4b94fb11b40b58b070b7b822e13cd0698ab7c4fc;hp=6024dd63e6b5154fe7ac7f4cd7914be48da00631;hpb=8107e05fdbd12ce8e0b7815d62791a63937eb07a;p=prosody.git diff --git a/util/dependencies.lua b/util/dependencies.lua index 6024dd63..9371521c 100644 --- a/util/dependencies.lua +++ b/util/dependencies.lua @@ -78,11 +78,6 @@ function check_dependencies() ["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 @@ function check_dependencies() 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;