Mercurial > prosody-modules
comparison mod_lib_ldap/ldap.lib.lua @ 3195:66b3085ecc49
mod_lib_ldap: assert() connection for hopefully better error reporting (thanks adac)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 26 Jul 2018 10:35:30 +0100 |
| parents | cd2262969d2e |
| children |
comparison
equal
deleted
inserted
replaced
| 3194:395835d89d88 | 3195:66b3085ecc49 |
|---|---|
| 166 return ldap.open_simple(params.hostname, params.bind_dn, params.bind_password, params.use_tls); | 166 return ldap.open_simple(params.hostname, params.bind_dn, params.bind_password, params.use_tls); |
| 167 end | 167 end |
| 168 | 168 |
| 169 -- this is abstracted so we can maintain persistent connections at a later time | 169 -- this is abstracted so we can maintain persistent connections at a later time |
| 170 function _M.getconnection() | 170 function _M.getconnection() |
| 171 return connect(); | 171 return assert(connect()); |
| 172 end | 172 end |
| 173 | 173 |
| 174 function _M.getparams() | 174 function _M.getparams() |
| 175 return params; | 175 return params; |
| 176 end | 176 end |
