Software /
code /
prosody
Diff
util/dependencies.lua @ 3904:f93163081b3c
prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 20 Dec 2010 14:06:16 +0000 |
parent | 2925:692b3c6c5bd2 |
child | 4236:75ef9ea83b07 |
child | 5830:ae48bf828f21 |
line wrap: on
line diff
--- 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;