You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mi...@apache.org on 2008/03/23 21:04:01 UTC

svn commit: r640248 - in /apr/apr-util/trunk: CHANGES ldap/apr_ldap_option.c

Author: minfrin
Date: Sun Mar 23 13:03:59 2008
New Revision: 640248

URL: http://svn.apache.org/viewvc?rev=640248&view=rev
Log:
Fix the setting of LDAP_OPT_SSL on Win2k, which expects a pointer to
the value LDAP_OPT_ON, and not the value itself. XP works with both.

Modified:
    apr/apr-util/trunk/CHANGES
    apr/apr-util/trunk/ldap/apr_ldap_option.c

Modified: apr/apr-util/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/CHANGES?rev=640248&r1=640247&r2=640248&view=diff
==============================================================================
--- apr/apr-util/trunk/CHANGES [utf-8] (original)
+++ apr/apr-util/trunk/CHANGES [utf-8] Sun Mar 23 13:03:59 2008
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.3.0
 
+  *) Fix the setting of LDAP_OPT_SSL on Win2k, which expects a pointer to
+     the value LDAP_OPT_ON, and not the value itself. XP works with both.
+     [Victor <vi...@gmail.com>]
+
   *) Fix a regression in apr_brigade_partition that causes integer overflows
      on systems where apr_off_t > apr_size_t.  [Ruediger Pluem]
 

Modified: apr/apr-util/trunk/ldap/apr_ldap_option.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/ldap/apr_ldap_option.c?rev=640248&r1=640247&r2=640248&view=diff
==============================================================================
--- apr/apr-util/trunk/ldap/apr_ldap_option.c (original)
+++ apr/apr-util/trunk/ldap/apr_ldap_option.c Sun Mar 23 13:03:59 2008
@@ -325,7 +325,8 @@
     /* Microsoft SDK */
 #if APR_HAS_MICROSOFT_LDAPSDK
     if (tls == APR_LDAP_NONE) {
-        result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, LDAP_OPT_OFF);
+        ULONG ul = (ULONG) LDAP_OPT_OFF;
+        result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, &ul);
         if (result->rc != LDAP_SUCCESS) {
             result->reason = "LDAP: an attempt to set LDAP_OPT_SSL off "
                              "failed.";
@@ -333,7 +334,8 @@
         }
     }
     else if (tls == APR_LDAP_SSL) {
-        result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, LDAP_OPT_ON);
+        ULONG ul = (ULONG) LDAP_OPT_ON;
+        result->rc = ldap_set_option(ldap, LDAP_OPT_SSL, &ul);
         if (result->rc != LDAP_SUCCESS) {
             result->reason = "LDAP: an attempt to set LDAP_OPT_SSL on "
                              "failed.";