]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix the server_merge so that the memory pools and mutexes that were created during...
authorBradley Nicholes <bnicholes@apache.org>
Fri, 17 Mar 2006 19:26:27 +0000 (19:26 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Fri, 17 Mar 2006 19:26:27 +0000 (19:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@386698 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index 27b715bd7dd162deca7ee1341e75b1e26dfb8210..a33b384b98a7699ef216001717e7f7f001e3f27f 100644 (file)
@@ -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;
 }