diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/sasl_cyrus.lua | 6 |
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; |