# HG changeset patch # User Waqas Hussain # Date 1279120911 -18000 # Node ID a2a242321901a4707d83a70679cdd9bcb4404005 # Parent 32dc830d976c07d549a7791dede9d8bae0311dd4 util.sasl, util.sasl_cyrus: Use method:mechanisms() in method:select(), instead of using the mechanisms list directly (fixes a traceback). diff -r 32dc830d976c -r a2a242321901 util/sasl.lua --- a/util/sasl.lua Wed Jul 14 20:10:35 2010 +0500 +++ b/util/sasl.lua Wed Jul 14 20:21:51 2010 +0500 @@ -111,7 +111,7 @@ 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 -r 32dc830d976c -r a2a242321901 util/sasl_cyrus.lua --- a/util/sasl_cyrus.lua Wed Jul 14 20:10:35 2010 +0500 +++ b/util/sasl_cyrus.lua Wed Jul 14 20:21:51 2010 +0500 @@ -144,8 +144,7 @@ -- 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