Diff

util/sasl.lua @ 6039:f8df0a996575

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 25 Mar 2014 19:18:32 +0100
parent 6036:f9e108f7db21
child 6777:5de6b93d0190
line wrap: on
line diff
--- a/util/sasl.lua	Sun Mar 09 23:48:32 2014 +0100
+++ b/util/sasl.lua	Tue Mar 25 19:18:32 2014 +0100
@@ -100,14 +100,16 @@
 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