aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-12-22 20:21:44 +0100
committerTobias Markmann <tm@ayena.de>2009-12-22 20:21:44 +0100
commit9d6dd22165165a74c1760e0aaa29939ac228956c (patch)
treea4a7dd2730b666a3257e94ea0a2c54c04dd51d2f /util
parentdf2be014da3d14a9ce95388f1b2f3376ad82cfed (diff)
downloadprosody-9d6dd22165165a74c1760e0aaa29939ac228956c.tar.gz
prosody-9d6dd22165165a74c1760e0aaa29939ac228956c.zip
util.sasl_cyrus: Log errors if CyrusSASL init fails.
Diffstat (limited to 'util')
-rw-r--r--util/sasl_cyrus.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/sasl_cyrus.lua b/util/sasl_cyrus.lua
index 8023d121..a4b3e0d4 100644
--- a/util/sasl_cyrus.lua
+++ b/util/sasl_cyrus.lua
@@ -49,8 +49,10 @@ function new(realm, service_name)
sasl_i.realm = realm;
sasl_i.service_name = service_name;
sasl_i.cyrus = cyrussasl.server_new(service_name, realm, realm, nil, nil)
- if sasl_i.cyrus ~= 0,
- "got NULL return value from server_new")
+ if sasl_i.cyrus == 0 then
+ log("error", "got NULL return value from server_new")
+ return nil;
+ end
cyrussasl.setssf(sasl_i.cyrus, 0, 0xffffffff)
local s = setmetatable(sasl_i, method);
return s;