mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
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
This commit is contained in:
@@ -257,7 +257,7 @@ static int uldap_connection_init(request_rec *r,
|
|||||||
int version = LDAP_VERSION3;
|
int version = LDAP_VERSION3;
|
||||||
apr_ldap_err_t *result = NULL;
|
apr_ldap_err_t *result = NULL;
|
||||||
#ifdef LDAP_OPT_NETWORK_TIMEOUT
|
#ifdef LDAP_OPT_NETWORK_TIMEOUT
|
||||||
struct timeval connectionTimeout = {10,0}; /* 10 second connection timeout */
|
struct timeval connectionTimeout = {0};
|
||||||
#endif
|
#endif
|
||||||
util_ldap_state_t *st =
|
util_ldap_state_t *st =
|
||||||
(util_ldap_state_t *)ap_get_module_config(r->server->module_config,
|
(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;
|
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,
|
rc = apr_ldap_set_option(r->pool, ldc->ldap, LDAP_OPT_NETWORK_TIMEOUT,
|
||||||
(void *)&connectionTimeout, &(result));
|
(void *)&connectionTimeout, &(result));
|
||||||
if (APR_SUCCESS != rc) {
|
if (APR_SUCCESS != rc) {
|
||||||
|
Reference in New Issue
Block a user