Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
3903:5924197aa163 | 3904:f93163081b3c |
---|---|
76 missingdep("LuaSec", { | 76 missingdep("LuaSec", { |
77 ["Debian/Ubuntu"] = "http://prosody.im/download/start#debian_and_ubuntu"; | 77 ["Debian/Ubuntu"] = "http://prosody.im/download/start#debian_and_ubuntu"; |
78 ["luarocks"] = "luarocks install luasec"; | 78 ["luarocks"] = "luarocks install luasec"; |
79 ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/"; | 79 ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/"; |
80 }, "SSL/TLS support will not be available"); | 80 }, "SSL/TLS support will not be available"); |
81 else | |
82 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); | |
83 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then | |
84 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); | |
85 end | |
86 end | 81 end |
87 | 82 |
88 local encodings, err = softreq "util.encodings" | 83 local encodings, err = softreq "util.encodings" |
89 if not encodings then | 84 if not encodings then |
90 if err:match("not found") then | 85 if err:match("not found") then |
119 fatal = true; | 114 fatal = true; |
120 end | 115 end |
121 return not fatal; | 116 return not fatal; |
122 end | 117 end |
123 | 118 |
119 function log_warnings() | |
120 if ssl then | |
121 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); | |
122 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then | |
123 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); | |
124 end | |
125 end | |
126 end | |
124 | 127 |
125 return _M; | 128 return _M; |