1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

LDAPConnectionPoolTTL should accept negative values in order to allow

connections of any age to be reused. Up to now, a negative value was handled
as an error when parsing the configuration file.  PR 66421.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christophe Jaillet
2023-01-27 12:58:32 +00:00
parent 735e7348ce
commit b2d18fb704
2 changed files with 8 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
*) mod_ldap: LDAPConnectionPoolTTL should accept negative values in order to
allow connections of any age to be reused. Up to now, a negative value
was handled as an error when parsing the configuration file. PR 66421.
[nailyk <bzapache nailyk.fr>, Christophe Jaillet]

View File

@@ -2817,12 +2817,14 @@ static const char *util_ldap_set_conn_ttl(cmd_parms *cmd,
void *dummy, void *dummy,
const char *val) const char *val)
{ {
apr_interval_time_t timeout; apr_interval_time_t timeout = -1;
util_ldap_state_t *st = util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module); &ldap_module);
if (ap_timeout_parameter_parse(val, &timeout, "s") != APR_SUCCESS) { /* Negative values mean AP_LDAP_CONNPOOL_INFINITE */
if (val[0] != '-' &&
ap_timeout_parameter_parse(val, &timeout, "s") != APR_SUCCESS) {
return "LDAPConnectionPoolTTL has wrong format"; return "LDAPConnectionPoolTTL has wrong format";
} }