diff mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua @ 838:c9e2beec4ef6

mod_auth_dovecot: Improved error reporting.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 28 Sep 2012 08:31:27 +0500
parents 881ec9919144
children bd88728b0d95
line wrap: on
line diff
--- a/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua	Sat Sep 22 02:06:21 2012 +0200
+++ b/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua	Fri Sep 28 08:31:27 2012 +0500
@@ -37,7 +37,10 @@
 end
 
 do
-	local s = new_sasl(module.host)
+	local s, err = new_sasl(module.host)
+	if not s then
+		log("error", "%s", tostring(err));
+	end
 	assert(s, "Could not create a new SASL object");
 	assert(s.mechanisms, "SASL object has no mechanims method");
 	local m, _m = {}, s:mechanisms();