Fixed SSL/TLS context renewal

LDAP_OPT_X_TLS_NEWCTX needs a pointer to 0 as the value for
ldap_set_option when renewing a client's SSL context.
This commit is contained in:
Ralf Haferkamp 2011-04-01 09:48:24 +02:00
parent 86dc9d8a4c
commit 0d5c46d838

View file

@ -110,7 +110,8 @@ std::string TlsOptions::getStringOption( tls_option opt ) const {
}
void TlsOptions::newCtx() const {
int ret = ldap_set_option( m_ld, LDAP_OPT_X_TLS_NEWCTX, LDAP_OPT_ON);
int val = 0;
int ret = ldap_set_option( m_ld, LDAP_OPT_X_TLS_NEWCTX, &val);
if ( ret != LDAP_OPT_SUCCESS )
{
if ( ret != LDAP_OPT_ERROR ){