diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-12-20 14:06:16 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-12-20 14:06:16 +0000 |
commit | 44bf454dd5af3036b29302b73622a9a1e5e0db12 (patch) | |
tree | bcb6459ad810cfb0f97a105641a28e70c6498e2c /util | |
parent | 7cc4ae96d4315892682a5dc35083ef463aa6f71e (diff) | |
download | prosody-44bf454dd5af3036b29302b73622a9a1e5e0db12.tar.gz prosody-44bf454dd5af3036b29302b73622a9a1e5e0db12.zip |
prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded
Diffstat (limited to 'util')
-rw-r--r-- | util/dependencies.lua | 13 |
1 files changed, 8 insertions, 5 deletions
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; |