]> granicus.if.org Git - apache/commitdiff
Remove the global only flag from the LDAPConnectionTimeout directive and add it to...
authorBradley Nicholes <bnicholes@apache.org>
Fri, 17 Mar 2006 22:52:21 +0000 (22:52 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Fri, 17 Mar 2006 22:52:21 +0000 (22:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@386751 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index a33b384b98a7699ef216001717e7f7f001e3f27f..d4c0e084cfdf0e3f5bdc33cf0c9e0903a2406a76 100644 (file)
@@ -1292,6 +1292,11 @@ static const char *util_ldap_set_cache_bytes(cmd_parms *cmd, void *dummy,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
+    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+    if (err != NULL) {
+        return err;
+    }
 
     st->cache_bytes = atol(bytes);
 
@@ -1309,6 +1314,11 @@ static const char *util_ldap_set_cache_file(cmd_parms *cmd, void *dummy,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
+    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+    if (err != NULL) {
+        return err;
+    }
 
     if (file) {
         st->cache_file = ap_server_root_relative(st->pool, file);
@@ -1330,6 +1340,11 @@ static const char *util_ldap_set_cache_ttl(cmd_parms *cmd, void *dummy,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
+    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+    if (err != NULL) {
+        return err;
+    }
 
     st->search_cache_ttl = atol(ttl) * 1000000;
 
@@ -1346,7 +1361,11 @@ static const char *util_ldap_set_cache_entries(cmd_parms *cmd, void *dummy,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
+    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
 
+    if (err != NULL) {
+        return err;
+    }
 
     st->search_cache_size = atol(size);
     if (st->search_cache_size < 0) {
@@ -1366,6 +1385,11 @@ static const char *util_ldap_set_opcache_ttl(cmd_parms *cmd, void *dummy,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
+    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+    if (err != NULL) {
+        return err;
+    }
 
     st->compare_cache_ttl = atol(ttl) * 1000000;
 
@@ -1382,6 +1406,11 @@ static const char *util_ldap_set_opcache_entries(cmd_parms *cmd, void *dummy,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
+    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+
+    if (err != NULL) {
+        return err;
+    }
 
     st->compare_cache_size = atol(size);
     if (st->compare_cache_size < 0) {
@@ -1696,11 +1725,6 @@ static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
     util_ldap_state_t *st =
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                   &ldap_module);
-    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
-
-    if (err != NULL) {
-        return err;
-    }
 
 #ifdef LDAP_OPT_NETWORK_TIMEOUT
     st->connectionTimeout = atol(ttl);