From: Yann Ylavic Date: Fri, 11 Sep 2015 15:30:16 +0000 (+0000) Subject: mod_slotmem_shm: follow up to r1702450. X-Git-Tag: 2.5.0-alpha~2856 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa96de5f3204d55b21c470899b64bd0092c007a4;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c index c880e5c87ef..d969b68878f 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);