Software /
code /
prosody
Comparison
util/sasl_cyrus.lua @ 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 |
parent | 2389:8f6526da4757 |
child | 2393:1572be348f88 |
comparison
equal
deleted
inserted
replaced
2391:521de84113da | 2392:8777831706d9 |
---|---|
47 function new(realm, service_name) | 47 function new(realm, service_name) |
48 local sasl_i = {}; | 48 local sasl_i = {}; |
49 sasl_i.realm = realm; | 49 sasl_i.realm = realm; |
50 sasl_i.service_name = service_name; | 50 sasl_i.service_name = service_name; |
51 sasl_i.cyrus = cyrussasl.server_new(service_name, realm, realm, nil, nil) | 51 sasl_i.cyrus = cyrussasl.server_new(service_name, realm, realm, nil, nil) |
52 if sasl_i.cyrus ~= 0, | 52 if sasl_i.cyrus == 0 then |
53 "got NULL return value from server_new") | 53 log("error", "got NULL return value from server_new") |
54 return nil; | |
55 end | |
54 cyrussasl.setssf(sasl_i.cyrus, 0, 0xffffffff) | 56 cyrussasl.setssf(sasl_i.cyrus, 0, 0xffffffff) |
55 local s = setmetatable(sasl_i, method); | 57 local s = setmetatable(sasl_i, method); |
56 return s; | 58 return s; |
57 end | 59 end |
58 | 60 |