Mercurial > prosody-hg
comparison util/dependencies.lua @ 7007:e28fbe6dd424
util.dependencies: Use prosody.log() instead of global log()
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 16 Dec 2015 02:22:16 +0000 |
| parents | 4009ae66e0f0 |
| children | 6d97895c2bd7 |
comparison
equal
deleted
inserted
replaced
| 7006:93771dad3e05 | 7007:e28fbe6dd424 |
|---|---|
| 135 return not fatal; | 135 return not fatal; |
| 136 end | 136 end |
| 137 | 137 |
| 138 local function log_warnings() | 138 local function log_warnings() |
| 139 if _VERSION > "Lua 5.1" then | 139 if _VERSION > "Lua 5.1" then |
| 140 log("warn", "Support for %s is experimental, please report any issues", _VERSION); | 140 prosody.log("warn", "Support for %s is experimental, please report any issues", _VERSION); |
| 141 end | 141 end |
| 142 local ssl = softreq"ssl"; | 142 local ssl = softreq"ssl"; |
| 143 if ssl then | 143 if ssl then |
| 144 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); | 144 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); |
| 145 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then | 145 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then |
| 146 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); | 146 prosody.log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); |
| 147 end | 147 end |
| 148 end | 148 end |
| 149 local lxp = softreq"lxp"; | 149 local lxp = softreq"lxp"; |
| 150 if lxp then | 150 if lxp then |
| 151 if not pcall(lxp.new, { StartDoctypeDecl = false }) then | 151 if not pcall(lxp.new, { StartDoctypeDecl = false }) then |
| 152 log("error", "The version of LuaExpat on your system leaves Prosody " | 152 prosody.log("error", "The version of LuaExpat on your system leaves Prosody " |
| 153 .."vulnerable to denial-of-service attacks. You should upgrade to " | 153 .."vulnerable to denial-of-service attacks. You should upgrade to " |
| 154 .."LuaExpat 1.3.0 or higher as soon as possible. See " | 154 .."LuaExpat 1.3.0 or higher as soon as possible. See " |
| 155 .."http://prosody.im/doc/depends#luaexpat for more information."); | 155 .."http://prosody.im/doc/depends#luaexpat for more information."); |
| 156 end | 156 end |
| 157 if not lxp.new({}).getcurrentbytecount then | 157 if not lxp.new({}).getcurrentbytecount then |
| 158 log("error", "The version of LuaExpat on your system does not support " | 158 prosody.log("error", "The version of LuaExpat on your system does not support " |
| 159 .."stanza size limits, which may leave servers on untrusted " | 159 .."stanza size limits, which may leave servers on untrusted " |
| 160 .."networks (e.g. the internet) vulnerable to denial-of-service " | 160 .."networks (e.g. the internet) vulnerable to denial-of-service " |
| 161 .."attacks. You should upgrade to LuaExpat 1.3.0 or higher as " | 161 .."attacks. You should upgrade to LuaExpat 1.3.0 or higher as " |
| 162 .."soon as possible. See " | 162 .."soon as possible. See " |
| 163 .."http://prosody.im/doc/depends#luaexpat for more information."); | 163 .."http://prosody.im/doc/depends#luaexpat for more information."); |
