diff options
author | Bradley Nicholes <bnicholes@apache.org> | 2006-03-17 20:26:27 +0100 |
---|---|---|
committer | Bradley Nicholes <bnicholes@apache.org> | 2006-03-17 20:26:27 +0100 |
commit | 23c7395f3ebf3ae5735cfc34881ba827b2b61a39 (patch) | |
tree | 0e660cfcef1c4361c78f7a2fe9c6f1d2c118e8fe | |
parent | Add mod_authz_dbd to the NetWare build (diff) | |
download | apache2-23c7395f3ebf3ae5735cfc34881ba827b2b61a39.tar.xz apache2-23c7395f3ebf3ae5735cfc34881ba827b2b61a39.zip |
Fix the server_merge so that the memory pools and mutexes that were created during the server_create, are used. Allow the settings that can be overwritten in a vhost to use the vhost values
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@386698 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | modules/ldap/util_ldap.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 27b715bd7d..a33b384b98 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -1753,18 +1753,22 @@ static void *util_ldap_merge_config(apr_pool_t *p, void *basev, util_ldap_state_t *base = (util_ldap_state_t *) basev; util_ldap_state_t *overrides = (util_ldap_state_t *) overridesv; - st->pool = base->pool; + st->pool = overrides->pool; #if APR_HAS_THREADS - st->mutex = base->mutex; + st->mutex = overrides->mutex; #endif + /* The cache settings can not be modified in a + virtual host since all server use the same + shared memory cache. */ st->cache_bytes = base->cache_bytes; st->search_cache_ttl = base->search_cache_ttl; st->search_cache_size = base->search_cache_size; st->compare_cache_ttl = base->compare_cache_ttl; st->compare_cache_size = base->compare_cache_size; - st->connections = base->connections; - st->ssl_supported = base->ssl_supported; + + st->connections = NULL; + st->ssl_supported = 0; st->global_certs = apr_array_append(p, base->global_certs, overrides->global_certs); st->client_certs = apr_array_append(p, base->client_certs, @@ -1772,6 +1776,14 @@ static void *util_ldap_merge_config(apr_pool_t *p, void *basev, st->secure = (overrides->secure_set == 0) ? base->secure : overrides->secure; + /* LDAP connection settings can be overwritten in a virtual host */ + st->connectionTimeout = (overrides->connectionTimeout == 10) + ? base->connectionTimeout + : overrides->connectionTimeout; + st->verify_svr_cert = (overrides->verify_svr_cert == 1) + ? base->verify_svr_cert + : overrides->verify_svr_cert; + return st; } |