Changeset

2393:1572be348f88

util.sasl_cyrus: Initializing Cyrus SASL library and a bit cleanup.
author Tobias Markmann <tm@ayena.de>
date Tue, 22 Dec 2009 20:55:35 +0100
parents 2392:8777831706d9
children 2394:a2972f9fda6d
files util/sasl_cyrus.lua
diffstat 1 files changed, 1 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl_cyrus.lua	Tue Dec 22 20:21:44 2009 +0100
+++ b/util/sasl_cyrus.lua	Tue Dec 22 20:55:35 2009 +0100
@@ -31,17 +31,7 @@
 local mechanisms = {};
 local backend_mechanism = {};
 
--- register a new SASL mechanims
-local function registerMechanism(name, backends, f)
-	assert(type(name) == "string", "Parameter name MUST be a string.");
-	assert(type(backends) == "string" or type(backends) == "table", "Parameter backends MUST be either a string or a table.");
-	assert(type(f) == "function", "Parameter f MUST be a function.");
-	mechanisms[name] = f
-	for _, backend_name in ipairs(backends) do
-		if backend_mechanism[backend_name] == nil then backend_mechanism[backend_name] = {}; end
-		t_insert(backend_mechanism[backend_name], name);
-	end
-end
+pcall(cyrussasl.server_init, "prosody")
 
 -- create a new SASL object which can be used to authenticate clients
 function new(realm, service_name)