Changeset

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
parents 2184:0d1740f7b6e8
children 2186:1112871916eb
files util/sasl.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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;