util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where appropriate

Thu, 18 Mar 2010 10:10:37 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 18 Mar 2010 10:10:37 +0000
changeset 2903
d6da8f8e3502
parent 2902
c405486f289c
child 2904
3e06b0f52363
child 2905
b924d915c4d0

util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where appropriate

util/sasl_cyrus.lua file | annotate | diff | comparison | revisions
--- 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
 

mercurial