]> granicus.if.org Git - apache/commitdiff
Fix two bugs introduced by r1070153
authorStefan Fritsch <sf@apache.org>
Sun, 13 Feb 2011 22:34:02 +0000 (22:34 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 13 Feb 2011 22:34:02 +0000 (22:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070317 13f79535-47bb-0310-9956-ffa450edef68

modules/core/mod_watchdog.c
modules/ssl/ssl_scache.c

index 7bc8a350ade04a173ab82fda2e5051c9948aab89..1642ee4690272765c374f7977b8c04a337fc033f 100644 (file)
@@ -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))) {
index d454c1f0418a788cf7076b661381a98620bc415c..2b51631240cb97a28e94128f500d37b0bb6fffdc 100644 (file)
@@ -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