Changeset

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
parents 3298:94087ee7587b
children 3300:b651f8290e27
files util/sasl_cyrus.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl_cyrus.lua	Thu Jun 24 04:13:01 2010 +0500
+++ b/util/sasl_cyrus.lua	Thu Jun 24 04:16:09 2010 +0500
@@ -166,10 +166,10 @@
 	   log("debug", "SASL mechanism not available from remote end")
 	   return "failure", "invalid-mechanism", "SASL mechanism not available"
 	elseif (err == -13) then -- SASL_BADAUTH
-	   return "failure", "not-authorized", cyrussasl.get_message( self.cyrus )
+	   return "failure", "not-authorized", sasl_errstring[err];
 	else
-	   log("debug", "Got SASL error condition %d: %s", err, cyrussasl.get_message( self.cyrus ))
-	   return "failure", "undefined-condition", cyrussasl.get_message( self.cyrus )
+	   log("debug", "Got SASL error condition %d: %s", err, sasl_errstring[err]);
+	   return "failure", "undefined-condition", sasl_errstring[err];
 	end
 end