diff options
author | Stefan Fritsch <sf@apache.org> | 2011-02-12 21:23:56 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-02-12 21:23:56 +0000 |
commit | 385da96d507220d60fe000c72b3867992032c0d2 (patch) | |
tree | 469b3571eee751bd078d099a730f7580a1a10293 /modules/cluster | |
parent | d6de9e9f67189d8ac673b9af0be40f5101d907ef (diff) | |
download | httpd-385da96d507220d60fe000c72b3867992032c0d2.tar.gz |
Use ap_state_query() to fix many modules that were not correctly initializing
if they were not active during server startup but got enabled later during a
graceful restart (in which case they need to do all work during a single
config run).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070153 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cluster')
-rw-r--r-- | modules/cluster/mod_heartmonitor.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c index 07bada1431..4c80e2d75c 100644 --- a/modules/cluster/mod_heartmonitor.c +++ b/modules/cluster/mod_heartmonitor.c @@ -665,8 +665,6 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { apr_status_t rv; - const char *userdata_key = "mod_heartmonitor_init"; - void *data; hm_ctx_t *ctx = ap_get_module_config(s->module_config, &heartmonitor_module); APR_OPTIONAL_FN_TYPE(ap_watchdog_get_instance) *hm_watchdog_get_instance; @@ -681,11 +679,8 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog, } /* Create the slotmem */ - apr_pool_userdata_get(&data, userdata_key, s->process->pool); - if (!data) { - /* first call do nothing */ - apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, s->process->pool); - } else { + if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_CONFIG) { + /* this is the real thing */ if (maxworkers) { storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0"); if (!storage) { |