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 | 6d96edf726384aa2ce4fd0f5479cf98a39c3b1ef (patch) | |
tree | 090958a816087d3440ddd124b5efb83d292a6cd7 /util | |
parent | e626770ceb54e4526ca2fec6aa59e63ca2cfd27f (diff) | |
download | prosody-6d96edf726384aa2ce4fd0f5479cf98a39c3b1ef.tar.gz prosody-6d96edf726384aa2ce4fd0f5479cf98a39c3b1ef.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; |