diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2023-01-27 12:58:32 +0000 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2023-01-27 12:58:32 +0000 |
commit | b2d18fb704c64ce7767e07fe546eecec98c91b50 (patch) | |
tree | f4c696fef1d669f367be3d359328b6b5237ff39c /modules | |
parent | 735e7348ce55677589f8cf90435e576d00722181 (diff) | |
download | httpd-b2d18fb704c64ce7767e07fe546eecec98c91b50.tar.gz |
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ldap/util_ldap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 759a5bba5e..98dfe90ac4 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -2817,12 +2817,14 @@ static const char *util_ldap_set_conn_ttl(cmd_parms *cmd, void *dummy, const char *val) { - apr_interval_time_t timeout; + apr_interval_time_t timeout = -1; util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, &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"; } |