util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where approp...
authorMatthew Wild <mwild1@gmail.com>
Thu, 18 Mar 2010 10:10:37 +0000 (10:10 +0000)
committerMatthew Wild <mwild1@gmail.com>
Thu, 18 Mar 2010 10:10:37 +0000 (10:10 +0000)
util/sasl_cyrus.lua

index 7e0cbc299882a4e2683ee1815d789ea196bcc9de..b5b0e08d0a5adf1662075bf024fc93e85ced0c6a 100644 (file)
@@ -123,16 +123,12 @@ function method:process(message)
           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