summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/cache/mod_socache_dbm.c5
-rw-r--r--modules/cache/mod_socache_shmcb.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/modules/cache/mod_socache_dbm.c b/modules/cache/mod_socache_dbm.c
index e7ffbbbfe2..2886400840 100644
--- a/modules/cache/mod_socache_dbm.c
+++ b/modules/cache/mod_socache_dbm.c
@@ -53,7 +53,12 @@ struct ap_socache_instance_t {
*/
#define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
+/* Check for definition of DEFAULT_REL_RUNTIMEDIR */
+#ifndef DEFAULT_REL_RUNTIMEDIR
+#define DEFAULT_DBM_PREFIX "logs/socache-dbm-"
+#else
#define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
+#endif
/* ### this should use apr_dbm_usednames. */
#if !defined(SSL_DBM_FILE_SUFFIX_DIR) && !defined(SSL_DBM_FILE_SUFFIX_PAG)
diff --git a/modules/cache/mod_socache_shmcb.c b/modules/cache/mod_socache_shmcb.c
index 549e305e92..ceacc4e5c9 100644
--- a/modules/cache/mod_socache_shmcb.c
+++ b/modules/cache/mod_socache_shmcb.c
@@ -31,6 +31,16 @@
#define SHMCB_MAX_SIZE (64 * 1024 * 1024)
+/* Check for definition of DEFAULT_REL_RUNTIMEDIR */
+#ifndef DEFAULT_REL_RUNTIMEDIR
+#define DEFAULT_SHMCB_PREFIX "logs/socache-shmcb-"
+#else
+#define DEFAULT_SHMCB_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-shmcb-"
+#endif
+
+#define DEFAULT_SHMCB_SUFFIX ".cache"
+
+
/*
* This shared memory based SSL session cache implementation was
* originally written by Geoff Thorpe <geoff geoffthorpe.net> for C2Net
@@ -307,9 +317,6 @@ static const char *socache_shmcb_create(ap_socache_instance_t **context,
return NULL;
}
-#define DEFAULT_SHMCB_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-shmcb-"
-#define DEFAULT_SHMCB_SUFFIX ".cache"
-
static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
const char *namespace,
const struct ap_socache_hints *hints,