mod_saslauth: Correct syntax for gracefully handling a missing cyrussasl library

Mon, 15 Feb 2010 22:56:15 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 15 Feb 2010 22:56:15 +0000
changeset 2646
064efb684aff
parent 2645
625d02b2a1a0
child 2647
0ddb3c4dc9d1

mod_saslauth: Correct syntax for gracefully handling a missing cyrussasl library

plugins/mod_saslauth.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_saslauth.lua	Mon Feb 15 22:53:32 2010 +0000
+++ b/plugins/mod_saslauth.lua	Mon Feb 15 22:56:15 2010 +0000
@@ -36,8 +36,8 @@
 
 local new_sasl;
 if sasl_backend == "cyrus" then
-	local cyrus, err = pcall(require, "util.sasl_cyrus");
-	if cyrus then
+	local ok, cyrus = pcall(require, "util.sasl_cyrus");
+	if ok then
 		local cyrus_new = cyrus.new;
 		new_sasl = function(realm)
 			return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp");

mercurial