Diff

util/sasl_cyrus.lua @ 2404:d7abdd6893b8

util.sasl_cyrus: Report an error if Cyrus SASL init fails.
author Tobias Markmann <tm@ayena.de>
date Wed, 30 Dec 2009 16:43:08 +0100
parent 2403:916482cdfb74
child 2577:acb382c703e4
line wrap: on
line diff
--- a/util/sasl_cyrus.lua	Tue Dec 29 01:04:48 2009 +0100
+++ b/util/sasl_cyrus.lua	Wed Dec 30 16:43:08 2009 +0100
@@ -35,8 +35,11 @@
 
 local function init(service_name)
 	if not initialized then
-		if pcall(cyrussasl.server_init, service_name) then
+		local st, errmsg = pcall(cyrussasl.server_init, service_name);
+		if st then
 			initialized = true;
+		else
+			log("error", "Failed to initialize CyrusSASL: %s", errmsg);
 		end
 	end
 end