Software /
code /
prosody
Comparison
util/sasl_cyrus.lua @ 3299:4448789c19ca
util.sasl_cyrus: Return error strings using the new table mapping error codes to strings.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 24 Jun 2010 04:16:09 +0500 |
parent | 3298:94087ee7587b |
child | 3363:a4bb658d3fcb |
comparison
equal
deleted
inserted
replaced
3298:94087ee7587b | 3299:4448789c19ca |
---|---|
164 return "challenge", data | 164 return "challenge", data |
165 elseif (err == -4) then -- SASL_NOMECH | 165 elseif (err == -4) then -- SASL_NOMECH |
166 log("debug", "SASL mechanism not available from remote end") | 166 log("debug", "SASL mechanism not available from remote end") |
167 return "failure", "invalid-mechanism", "SASL mechanism not available" | 167 return "failure", "invalid-mechanism", "SASL mechanism not available" |
168 elseif (err == -13) then -- SASL_BADAUTH | 168 elseif (err == -13) then -- SASL_BADAUTH |
169 return "failure", "not-authorized", cyrussasl.get_message( self.cyrus ) | 169 return "failure", "not-authorized", sasl_errstring[err]; |
170 else | 170 else |
171 log("debug", "Got SASL error condition %d: %s", err, cyrussasl.get_message( self.cyrus )) | 171 log("debug", "Got SASL error condition %d: %s", err, sasl_errstring[err]); |
172 return "failure", "undefined-condition", cyrussasl.get_message( self.cyrus ) | 172 return "failure", "undefined-condition", sasl_errstring[err]; |
173 end | 173 end |
174 end | 174 end |
175 | 175 |
176 return _M; | 176 return _M; |