httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1702501 - /httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
Date Fri, 11 Sep 2015 15:30:17 GMT
Author: ylavic
Date: Fri Sep 11 15:30:16 2015
New Revision: 1702501

URL: http://svn.apache.org/r1702501
Log:
mod_slotmem_shm: follow up to r1702450.
Use the generation number from the MPM (AP_MPMQ_GENERATION) since AP_SQ_CONFIG_GEN is irrelevent
in non-forked MPMs children.

Modified:
    httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c

Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=1702501&r1=1702500&r2=1702501&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Fri Sep 11 15:30:16 2015
@@ -25,6 +25,7 @@
 
 #include "httpd.h"
 #include "http_main.h"
+#include "ap_mpm.h" /* for ap_mpm_query() */
 
 #define AP_SLOTMEM_IS_PREGRAB(t)    (t->desc.type & AP_SLOTMEM_TYPE_PREGRAB)
 #define AP_SLOTMEM_IS_PERSIST(t)    (t->desc.type & AP_SLOTMEM_TYPE_PERSIST)
@@ -119,9 +120,12 @@ static int slotmem_filenames(apr_pool_t
                             NULL);
 #else
         /* Each generation needs its own file name. */
-        fname = apr_psprintf(pool, "%s%s_%x%s", DEFAULT_SLOTMEM_PREFIX,
-                             fname, ap_state_query(AP_SQ_CONFIG_GEN),
-                             DEFAULT_SLOTMEM_SUFFIX);
+        {
+            int generation = 0;
+            ap_mpm_query(AP_MPMQ_GENERATION, &generation);
+            fname = apr_psprintf(pool, "%s%s_%x%s", DEFAULT_SLOTMEM_PREFIX,
+                                 fname, generation, DEFAULT_SLOTMEM_SUFFIX);
+        }
 #endif
         fname = ap_runtime_dir_relative(pool, fname);
 



Mime
View raw message