Software /
code /
prosody
Changeset
2392:8777831706d9
util.sasl_cyrus: Log errors if CyrusSASL init fails.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Tue, 22 Dec 2009 20:21:44 +0100 |
parents | 2391:521de84113da |
children | 2393:1572be348f88 |
files | util/sasl_cyrus.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sasl_cyrus.lua Tue Dec 22 20:20:37 2009 +0100 +++ b/util/sasl_cyrus.lua Tue Dec 22 20:21:44 2009 +0100 @@ -49,8 +49,10 @@ 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;