Author: minfrin
Date: Mon Mar 24 14:50:37 2025
New Revision: 1924556
URL: http://svn.apache.org/viewvc?rev=1924556&view=rev
Log:
apr_ldap: Fix the switching on and off of LDAP_OPT_SSL in the
Microsoft LDAP SDK.
Modified:
apr/apr/trunk/ldap/apr_ldap.c
Modified: apr/apr/trunk/ldap/apr_ldap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/ldap/apr_ldap.c?rev=1924556&r1=1924555&r2=1924556&view=diff
==============================================================================
--- apr/apr/trunk/ldap/apr_ldap.c (original)
+++ apr/apr/trunk/ldap/apr_ldap.c Mon Mar 24 14:50:37 2025
@@ -610,8 +610,7 @@ static int option_set_tls(LDAP *ldap, co
/* Microsoft SDK */
#if APR_HAS_MICROSOFT_LDAPSDK
if (tls == APR_LDAP_NONE) {
- ULONG ul = (ULONG) LDAP_OPT_OFF;
- result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, &ul);
+ result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, LDAP_OPT_OFF);
if (result->rc != LDAP_SUCCESS) {
result->reason = "LDAP: an attempt to set LDAP_OPT_SSL off "
"failed.";
@@ -619,8 +618,7 @@ static int option_set_tls(LDAP *ldap, co
}
}
else if (tls == APR_LDAP_SSL) {
- ULONG ul = (ULONG) LDAP_OPT_ON;
- result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, &ul);
+ result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, LDAP_OPT_ON);
if (result->rc != LDAP_SUCCESS) {
result->reason = "LDAP: an attempt to set LDAP_OPT_SSL on "
"failed.";
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.