Mailing List Archive

svn commit: r1915791 - in /httpd/httpd/branches/2.4.x: ./ changes-entries/mod_slotmem_shm.txt modules/slotmem/mod_slotmem_shm.c
Author: jfclere
Date: Wed Feb 14 14:27:03 2024
New Revision: 1915791

URL: http://svn.apache.org/viewvc?rev=1915791&view=rev
Log:
* mod_slotmem_shm: Use ap_os_is_path_absolute() to make it portable.

Reviewed by: jfclere, jorton, covener


Added:
httpd/httpd/branches/2.4.x/changes-entries/mod_slotmem_shm.txt
- copied unchanged from r1915785, httpd/httpd/trunk/changes-entries/mod_slotmem_shm.txt
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1915400,1915785

Modified: httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c?rev=1915791&r1=1915790&r2=1915791&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c Wed Feb 14 14:27:03 2024
@@ -92,7 +92,7 @@ static int slotmem_filenames(apr_pool_t
const char *fname = NULL, *pname = NULL;

if (slotname && *slotname && strcasecmp(slotname, "none") != 0) {
- if (slotname[0] != '/') {
+ if (!ap_os_is_path_absolute(pool, slotname)) {
/* Each generation needs its own file name. */
int generation = 0;
ap_mpm_query(AP_MPMQ_GENERATION, &generation);
@@ -109,7 +109,7 @@ static int slotmem_filenames(apr_pool_t

if (persistname) {
/* Persisted file names are immutable... */
- if (slotname[0] != '/') {
+ if (!ap_os_is_path_absolute(pool, slotname)) {
pname = apr_pstrcat(pool, DEFAULT_SLOTMEM_PREFIX,
slotname, DEFAULT_SLOTMEM_SUFFIX,
DEFAULT_SLOTMEM_PERSIST_SUFFIX,