Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 2646:064efb684aff
mod_saslauth: Correct syntax for gracefully handling a missing cyrussasl library
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 15 Feb 2010 22:56:15 +0000 |
parent | 2642:333d7e2033b2 |
child | 2647:0ddb3c4dc9d1 |
line wrap: on
line diff
--- 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");