You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/02/13 23:34:02 UTC

svn commit: r1070317 - in /httpd/httpd/trunk/modules: core/mod_watchdog.c ssl/ssl_scache.c

Author: sf
Date: Sun Feb 13 22:34:02 2011
New Revision: 1070317

URL: http://svn.apache.org/viewvc?rev=1070317&view=rev
Log:
Fix two bugs introduced by r1070153

Modified:
    httpd/httpd/trunk/modules/core/mod_watchdog.c
    httpd/httpd/trunk/modules/ssl/ssl_scache.c

Modified: httpd/httpd/trunk/modules/core/mod_watchdog.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/core/mod_watchdog.c?rev=1070317&r1=1070316&r2=1070317&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/core/mod_watchdog.c (original)
+++ httpd/httpd/trunk/modules/core/mod_watchdog.c Sun Feb 13 22:34:02 2011
@@ -440,13 +440,6 @@ static int wd_post_config_hook(apr_pool_
     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_
         }
     }
 #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))) {

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache.c?rev=1070317&r1=1070316&r2=1070317&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache.c Sun Feb 13 22:34:02 2011
@@ -48,7 +48,7 @@ void ssl_scache_init(server_rec *s, apr_
      * 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