summaryrefslogtreecommitdiffstats
path: root/server/core.c
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2019-04-18 12:25:33 +0200
committerJoe Orton <jorton@apache.org>2019-04-18 12:25:33 +0200
commit835b74a4d080471c4cca9432e1482ee6c2b524dd (patch)
tree6972153c02be1cc5dbe65fb071c9d11361638649 /server/core.c
parentTransforms. (diff)
downloadapache2-835b74a4d080471c4cca9432e1482ee6c2b524dd.tar.xz
apache2-835b74a4d080471c4cca9432e1482ee6c2b524dd.zip
Fix use of StateDir directive after r1852982:
* server/core.c (reset_config): Rename from reset_config_defines; tie core_state_dir to pconf lifetime in this cleanup. (core_pre_config): Adjust accordingly. * modules/md/mod_md_config.c (md_config_post_config): Pick up base_dir from statedir in post-config phase so StateDir can influence it. * modules/dav/fs/mod_dav_fs.c (dav_fs_create_server_config): Don't init lockdb_path here. (dav_fs_post_config): New function; set lockdb_path based on configured statedir. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1857731 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/core.c')
-rw-r--r--server/core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/core.c b/server/core.c
index ceb7dd6bb8..2ce5af70e2 100644
--- a/server/core.c
+++ b/server/core.c
@@ -1489,12 +1489,15 @@ AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word)
return res_buf;
}
-static int reset_config_defines(void *dummy)
+/* pconf cleanup - clear global variables set from config here. */
+static apr_status_t reset_config(void *dummy)
{
ap_server_config_defines = saved_server_config_defines;
saved_server_config_defines = NULL;
server_config_defined_vars = NULL;
- return OK;
+ core_state_dir = NULL;
+
+ return APR_SUCCESS;
}
/*
@@ -5294,13 +5297,11 @@ static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptem
if (!saved_server_config_defines)
init_config_defines(pconf);
- apr_pool_cleanup_register(pconf, NULL, reset_config_defines,
- apr_pool_cleanup_null);
+ apr_pool_cleanup_register(pconf, NULL, reset_config, apr_pool_cleanup_null);
ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
mpm_common_pre_config(pconf);
- core_state_dir = NULL;
return OK;
}