diff util/sasl_cyrus.lua @ 3366:a2a242321901

util.sasl, util.sasl_cyrus: Use method:mechanisms() in method:select(), instead of using the mechanisms list directly (fixes a traceback).
author Waqas Hussain <waqas20@gmail.com>
date Wed, 14 Jul 2010 20:21:51 +0500
parents 32dc830d976c
children cd6836586a6a
line wrap: on
line diff
--- 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