aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-08-28 22:03:11 +0200
committerTobias Markmann <tm@ayena.de>2009-08-28 22:03:11 +0200
commit85fb108f5dd540f3ea9b3920cc8b5e1a40834c44 (patch)
tree904394a7c78c75618b35ffe026362a2ec0c5a644 /util/sasl.lua
parent2c8f4d3ed84300f22b1b66d4e795e6478500e047 (diff)
downloadprosody-85fb108f5dd540f3ea9b3920cc8b5e1a40834c44.tar.gz
prosody-85fb108f5dd540f3ea9b3920cc8b5e1a40834c44.zip
Fail if mechanism has already been selected.
Diffstat (limited to 'util/sasl.lua')
-rw-r--r--util/sasl.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index 6b14c1b1..36f43ec2 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -102,6 +102,10 @@ end
-- select a mechanism to use
function method:select(mechanism)
+ if self.mech_i then
+ return false;
+ end
+
self.mech_i = mechanisms[mechanism]
if self.mech_i == nil then
return false;