util.sasl, util.sasl_cyrus: Use method:mechanisms() in method:select(), instead of using the mechanisms list directly (fixes a traceback).

vault/0.11
Waqas Hussain 16 years ago
parent 81c3a58d1f
commit 74f1fca10e
  1. 2
      util/sasl.lua
  2. 3
      util/sasl_cyrus.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

@ -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

Loading…
Cancel
Save