From: Christophe Jaillet <jailletc36@apache.org>
Date: Fri, 29 Mar 2013 20:59:22 +0000 (+0000)
Subject: Name pool + concat string at compile time when possible
X-Git-Tag: 2.5.0-alpha~5636
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9ddf49c3f11905df29f593ad7f10f29b2cb0b43;p=apache

Name pool + concat string at compile time when possible

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1462643 13f79535-47bb-0310-9956-ffa450edef68
---

diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c
index 670e4b8d0c..919613ca51 100644
--- a/modules/cache/mod_cache_disk.c
+++ b/modules/cache/mod_cache_disk.c
@@ -80,7 +80,7 @@ static char *header_file(apr_pool_t *p, disk_cache_conf *conf,
     }
 
     if (dobj->prefix) {
-        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX, "/",
+        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX "/",
                            dobj->hashfile, CACHE_HEADER_SUFFIX, NULL);
      }
      else {
@@ -98,7 +98,7 @@ static char *data_file(apr_pool_t *p, disk_cache_conf *conf,
     }
 
     if (dobj->prefix) {
-        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX, "/",
+        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX "/",
                            dobj->hashfile, CACHE_DATA_SUFFIX, NULL);
      }
      else {
@@ -385,6 +385,7 @@ static int create_entity(cache_handle_t *h, request_rec *r, const char *key, apr
     dobj->root_len = conf->cache_root_len;
 
     apr_pool_create(&pool, r->pool);
+    apr_pool_tag(pool, "mod_cache (create_entity)");
 
     file_cache_create(conf, &dobj->hdrs, pool);
     file_cache_create(conf, &dobj->vary, pool);
@@ -511,6 +512,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
     dobj->name = key;
 
     apr_pool_create(&pool, r->pool);
+    apr_pool_tag(pool, "mod_cache (open_entity)");
 
     file_cache_create(conf, &dobj->hdrs, pool);
     file_cache_create(conf, &dobj->vary, pool);