httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: svn commit: r124187 - /httpd/httpd/trunk/CHANGES /httpd/httpd/trunk/modules/ldap/util_ldap.c
Date Wed, 05 Jan 2005 17:18:40 GMT
At 01:07 AM 1/5/2005, minfrin@apache.org wrote:
>Author: minfrin
>Date: Tue Jan  4 23:07:46 2005
>New Revision: 124187
>
>URL: http://svn.apache.org/viewcvs?view=rev&rev=124187
>Log:
>Fix some compiler warnings inside the LDAP modules
>--- httpd/httpd/trunk/modules/ldap/util_ldap.c  (original)
>+++ httpd/httpd/trunk/modules/ldap/util_ldap.c  Tue Jan  4 23:07:46 2005
>@@ -264,7 +264,8 @@
>           a host string that contains multiple hosts the ability to mix some
>           hosts with ports and some without. All hosts which do not specify 
>           a port will use the default port.*/
>-        apr_ldap_init(r->pool, &(ldc->ldap), ldc->host, ldc->secure?LDAPS_PORT:LDAP_PORT,
>+        apr_ldap_init(r->pool, &(ldc->ldap),
>+                      ldc->host, ldc->secure?LDAPS_PORT:LDAP_PORT,
>                       ldc->secure, &(result));

Based on your new schema, don't you mean
+        apr_ldap_init(r->pool, &(ldc->ldap),
+                      ldc->host, (ldc->secure==1)?LDAPS_PORT:LDAP_PORT,
                       ldc->secure, &(result));

>@@ -298,7 +299,9 @@
>       */
>     for (failures=0; failures<10; failures++)
>     {
>-        result = ldap_simple_bind_s(ldc->ldap, ldc->binddn, ldc->bindpw);
>+        result = ldap_simple_bind_s(ldc->ldap,
>+                                    (char *)ldc->binddn,
>+                                    (char *)ldc->bindpw);

Casts?!?  Outch.  Is this purely for const'ness?

>+    if ((result = ldap_search_ext_s(ldc->ldap, (char *)reqdn, LDAP_SCOPE_BASE, 
>                                    "(objectclass=*)", NULL, 1, 
>                                    NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN)
{
>+    if ((result = ldap_compare_s(ldc->ldap,
>+                                 (char *)dn,
>+                                 (char *)attrib,
>+                                 (char *)value))
>+                                               == LDAP_SERVER_DOWN) { 
>     if ((result = ldap_search_ext_s(ldc->ldap,
>-                                   basedn, scope, 
>-                                   filter, attrs, 0, 
>+                                   (char *)basedn, scope, 
>+                                   (char *)filter, attrs, 0, 
>                                    NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN)
{
>+    if ((result = ldap_simple_bind_s(ldc->ldap,
>+                                     (char *)*binddn,
>+                                     (char *)bindpw)) == LDAP_SERVER_DOWN) {
>     if ((result = ldap_search_ext_s(ldc->ldap,
>-                                   basedn, scope, filter, attrs, 0, 
>-                                   NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN)
{
>+                                   (char *)basedn, scope,
>+                                    (char *)filter, attrs, 0, 
>+                                   NULL, NULL,
>+                                    NULL, -1, &res)) == LDAP_SERVER_DOWN) {

dittos.

Bill



Mime
View raw message