aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-03-25 19:18:32 +0100
committerKim Alvefur <zash@zash.se>2014-03-25 19:18:32 +0100
commitc98c0fb432db6ce9c7bbcd433168aa27b36854b8 (patch)
tree652efec3423f31c2562f4eab50e0bd3d48bf884c /util
parent7ac11ee4c7a1f7a02e9876d1ab08669d12ec53b0 (diff)
parent8c0d996be4f47b77a02668474d3d8a0a41bd0f98 (diff)
downloadprosody-c98c0fb432db6ce9c7bbcd433168aa27b36854b8.tar.gz
prosody-c98c0fb432db6ce9c7bbcd433168aa27b36854b8.zip
Merge 0.10->trunk
Diffstat (limited to 'util')
-rw-r--r--util/sasl.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index c8490842..b91e29a6 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -100,14 +100,16 @@ end
function method:mechanisms()
local current_mechs = {};
for mech, _ in pairs(self.mechs) do
- if mechanism_channelbindings[mech] and self.profile.cb then
- local ok = false;
- for cb_name, _ in pairs(self.profile.cb) do
- if mechanism_channelbindings[mech][cb_name] then
- ok = true;
+ if mechanism_channelbindings[mech] then
+ if self.profile.cb then
+ local ok = false;
+ for cb_name, _ in pairs(self.profile.cb) do
+ if mechanism_channelbindings[mech][cb_name] then
+ ok = true;
+ end
end
+ if ok == true then current_mechs[mech] = true; end
end
- if ok == true then current_mechs[mech] = true; end
else
current_mechs[mech] = true;
end