aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-25 01:56:20 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-25 01:56:20 +0000
commit8c44b0425f0e7030b3341fb4ea7a47b8558119b9 (patch)
tree8aefd384223b4ed11437b0cee040299a06ec1ebe
parentbdb44039514c53f2e8466db48f6b08ed967f730b (diff)
downloadprosody-8c44b0425f0e7030b3341fb4ea7a47b8558119b9.tar.gz
prosody-8c44b0425f0e7030b3341fb4ea7a47b8558119b9.zip
Fix softreq, so it reports when no suitable MD5 library is found
-rw-r--r--util/hashes.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/hashes.lua b/util/hashes.lua
index 5ed9d3ac..2fd0fbd8 100644
--- a/util/hashes.lua
+++ b/util/hashes.lua
@@ -1,5 +1,5 @@
-local softreq = function (...) return select(2, pcall(require, ...)); end
+local softreq = function (...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil; end end
local error = error;
module "hashes"