diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/sasl.lua | 2 | ||||
-rw-r--r-- | util/sasl_cyrus.lua | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/util/sasl.lua b/util/sasl.lua index 8f91f7b5..ab8b78a8 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -111,7 +111,7 @@ function method:select(mechanism) return false; end - self.mech_i = self.mechs[mechanism]; + self.mech_i = mechanisms[self.mechanisms()[mechanism] and mechanism]; return (self.mech_i ~= nil); end diff --git a/util/sasl_cyrus.lua b/util/sasl_cyrus.lua index 5178f7cd..0676bcf7 100644 --- a/util/sasl_cyrus.lua +++ b/util/sasl_cyrus.lua @@ -144,8 +144,7 @@ end -- select a mechanism to use function method:select(mechanism) self.mechanism = mechanism; - if not self.mechs then self:mechanisms(); end - return self.mechs[mechanism]; + return self.mechanisms()[mechanism]; end -- feed new messages to process into the library |