From fa96de5f3204d55b21c470899b64bd0092c007a4 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Fri, 11 Sep 2015 15:30:16 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702501 13f79535-47bb-0310-9956-ffa450edef68 --- modules/slotmem/mod_slotmem_shm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c index c880e5c87e..d969b68878 100644 --- a/modules/slotmem/mod_slotmem_shm.c +++ b/modules/slotmem/mod_slotmem_shm.c @@ -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 *pool, 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); -- 2.40.0