Comparison

util/sasl_cyrus.lua @ 2400:b8d2168dc9c3

util.sasl_cyrus: Fixing cyrus mechanism list parsing. (Thanks darkrain)
author Tobias Markmann <tm@ayena.de>
date Mon, 28 Dec 2009 20:21:49 +0100
parent 2396:39b2523bcf44
child 2401:dbfdcb75209a
comparison
equal deleted inserted replaced
2399:0325f241a26c 2400:b8d2168dc9c3
62 62
63 -- get a list of possible SASL mechanims to use 63 -- get a list of possible SASL mechanims to use
64 function method:mechanisms() 64 function method:mechanisms()
65 local mechanisms = {} 65 local mechanisms = {}
66 local cyrus_mechs = cyrussasl.listmech(self.cyrus, nil, "", " ", "") 66 local cyrus_mechs = cyrussasl.listmech(self.cyrus, nil, "", " ", "")
67 for w in s_gmatch(cyrus_mechs, "%a+") do 67 for w in s_gmatch(cyrus_mechs, "[^ ]+") do
68 mechanisms[w] = true; 68 mechanisms[w] = true;
69 end 69 end
70 self.mechanisms = mechanisms 70 self.mechanisms = mechanisms
71 return array.collect(keys(mechanisms)); 71 return array.collect(keys(mechanisms));
72 end 72 end