From c2236c7cbf3dcf57c36a62895f04ba337d92e33a Mon Sep 17 00:00:00 2001
From: Eric Covener <covener@apache.org>
Date: Thu, 8 Sep 2011 12:53:06 +0000
Subject: [PATCH] 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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166662 13f79535-47bb-0310-9956-ffa450edef68
---
 modules/ldap/util_ldap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c
index c7d017bbde..075e9d8c87 100644
--- a/modules/ldap/util_ldap.c
+++ b/modules/ldap/util_ldap.c
@@ -257,7 +257,7 @@ static int uldap_connection_init(request_rec *r,
     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_rec *r,
         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) {
-- 
2.40.0