Changeset

2903:d6da8f8e3502

util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where appropriate
author Matthew Wild <mwild1@gmail.com>
date Thu, 18 Mar 2010 10:10:37 +0000
parents 2902:c405486f289c
children 2904:3e06b0f52363 2905:b924d915c4d0
files util/sasl_cyrus.lua
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl_cyrus.lua	Thu Mar 18 10:05:35 2010 +0000
+++ b/util/sasl_cyrus.lua	Thu Mar 18 10:10:37 2010 +0000
@@ -123,16 +123,12 @@
 	   return "challenge", data
 	elseif (err == -4) then -- SASL_NOMECH
 	   log("debug", "SASL mechanism not available from remote end")
-	   return "failure", 
-	     "undefined-condition",
-	     "SASL mechanism not available"
+	   return "failure", "invalid-mechanism", "SASL mechanism not available"
 	elseif (err == -13) then -- SASL_BADAUTH
 	   return "failure", "not-authorized", cyrussasl.get_message( self.cyrus )
 	else
 	   log("debug", "Got SASL error condition %d", err)
-	   return "failure", 
-	     "undefined-condition",
-	     cyrussasl.get_message( self.cyrus )
+	   return "failure", "undefined-condition", cyrussasl.get_message( self.cyrus )
 	end
 end