You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2011/09/08 14:53:06 UTC

svn commit: r1166662 - /httpd/httpd/trunk/modules/ldap/util_ldap.c

Author: covener
Date: Thu Sep  8 12:53:06 2011
New Revision: 1166662

URL: http://svn.apache.org/viewvc?rev=1166662&view=rev
Log:
The default timeout value of 10s lives in two places, the per-server config
and in this initialization. Drop the latter and check to see if a timeout
is requested in the per-server config.

Modified:
    httpd/httpd/trunk/modules/ldap/util_ldap.c

Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=1166662&r1=1166661&r2=1166662&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Thu Sep  8 12:53:06 2011
@@ -257,7 +257,7 @@ static int uldap_connection_init(request
     int version  = LDAP_VERSION3;
     apr_ldap_err_t *result = NULL;
 #ifdef LDAP_OPT_NETWORK_TIMEOUT
-    struct timeval connectionTimeout = {10,0};    /* 10 second connection timeout */
+    struct timeval connectionTimeout = {0}; 
 #endif
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(r->server->module_config,
@@ -417,7 +417,7 @@ static int uldap_connection_init(request
         connectionTimeout.tv_sec = st->connectionTimeout;
     }
 
-    if (st->connectionTimeout >= 0) {
+    if (connectionTimeout.tv_sec > 0) {
         rc = apr_ldap_set_option(r->pool, ldc->ldap, LDAP_OPT_NETWORK_TIMEOUT,
                                  (void *)&connectionTimeout, &(result));
         if (APR_SUCCESS != rc) {