Diff

util/sasl.lua @ 2185:e92339c48ee6 sasl

Fail if mechanism has already been selected.
author Tobias Markmann <tm@ayena.de>
date Fri, 28 Aug 2009 22:03:11 +0200
parent 2184:0d1740f7b6e8
child 2186:1112871916eb
line wrap: on
line diff
--- a/util/sasl.lua	Fri Aug 28 22:01:58 2009 +0200
+++ b/util/sasl.lua	Fri Aug 28 22:03:11 2009 +0200
@@ -102,6 +102,10 @@
 
 -- 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;