Fail if mechanism has already been selected.
authorTobias Markmann <tm@ayena.de>
Fri, 28 Aug 2009 20:03:11 +0000 (22:03 +0200)
committerTobias Markmann <tm@ayena.de>
Fri, 28 Aug 2009 20:03:11 +0000 (22:03 +0200)
util/sasl.lua

index 6b14c1b1b83e87082fc45986e2fe17a6577b3a79..36f43ec21008c6cfc833aabf0b15750b745ea8cf 100644 (file)
@@ -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;