Software /
code /
prosody
Comparison
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 |
parent | 3365:32dc830d976c |
child | 3373:cd6836586a6a |
comparison
equal
deleted
inserted
replaced
3365:32dc830d976c | 3366:a2a242321901 |
---|---|
142 end | 142 end |
143 | 143 |
144 -- select a mechanism to use | 144 -- select a mechanism to use |
145 function method:select(mechanism) | 145 function method:select(mechanism) |
146 self.mechanism = mechanism; | 146 self.mechanism = mechanism; |
147 if not self.mechs then self:mechanisms(); end | 147 return self.mechanisms()[mechanism]; |
148 return self.mechs[mechanism]; | |
149 end | 148 end |
150 | 149 |
151 -- feed new messages to process into the library | 150 -- feed new messages to process into the library |
152 function method:process(message) | 151 function method:process(message) |
153 local err; | 152 local err; |