aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-18 10:10:37 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-18 10:10:37 +0000
commit367052b11183ae48ca5b5c38493ff22fba943b56 (patch)
treeb43b372395bc10e0f1cf4e0638e306bb3b6ef415 /util
parentd8c2bb590c23ddc0810c0e7ea6e182065f4b6f6d (diff)
downloadprosody-367052b11183ae48ca5b5c38493ff22fba943b56.tar.gz
prosody-367052b11183ae48ca5b5c38493ff22fba943b56.zip
util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where appropriate
Diffstat (limited to 'util')
-rw-r--r--util/sasl_cyrus.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/util/sasl_cyrus.lua b/util/sasl_cyrus.lua
index 7e0cbc29..b5b0e08d 100644
--- a/util/sasl_cyrus.lua
+++ b/util/sasl_cyrus.lua
@@ -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