From d2b73e573068038a4c2c0ed88c3da52a4d981f6c Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sun, 13 Feb 2011 22:34:02 +0000 Subject: [PATCH] Fix two bugs introduced by r1070153 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070317 13f79535-47bb-0310-9956-ffa450edef68 --- modules/core/mod_watchdog.c | 15 ++++++++------- modules/ssl/ssl_scache.c | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c index 7bc8a350ad..1642ee4690 100644 --- a/modules/core/mod_watchdog.c +++ b/modules/core/mod_watchdog.c @@ -440,13 +440,6 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pproc = s->process->pool; const apr_array_header_t *wl; - apr_pool_userdata_get((void *)&wd_server_conf, pk, pproc); - if (!wd_server_conf) { - if (!(wd_server_conf = apr_pcalloc(pproc, sizeof(wd_server_conf_t)))) - return APR_ENOMEM; - apr_pool_create(&wd_server_conf->pool, pproc); - } - if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) /* First time config phase -- skip. */ return OK; @@ -463,6 +456,14 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, } } #endif + + apr_pool_userdata_get((void *)&wd_server_conf, pk, pproc); + if (!wd_server_conf) { + if (!(wd_server_conf = apr_pcalloc(pproc, sizeof(wd_server_conf_t)))) + return APR_ENOMEM; + apr_pool_create(&wd_server_conf->pool, pproc); + apr_pool_userdata_set(wd_server_conf, pk, apr_pool_cleanup_null, pproc); + } wd_server_conf->s = s; if ((wl = ap_list_provider_names(pconf, AP_WATCHODG_PGROUP, AP_WATCHODG_PVERSION))) { diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c index d454c1f041..2b51631240 100644 --- a/modules/ssl/ssl_scache.c +++ b/modules/ssl/ssl_scache.c @@ -48,7 +48,7 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p) * this first (and only the first) time through, since the pool * will be immediately cleared anyway. For every subsequent * invocation, initialize the configured cache. */ - if (!ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) + if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) return; #ifdef HAVE_OCSP_STAPLING -- 2.40.0