summaryrefslogtreecommitdiffstats
path: root/auth_mellon_config.c
diff options
context:
space:
mode:
authorolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2014-06-20 11:24:38 +0000
committerolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2014-06-20 11:24:38 +0000
commit8dacb0388763ec4da5198b2d6063b45067e16c21 (patch)
treec026be0b1da1e8ccd0c954f34776aa29018c83fd /auth_mellon_config.c
parent66f6d2cb087e471d8599c8e221745b6e055f5d12 (diff)
downloadmod_auth_mellon-8dacb0388763ec4da5198b2d6063b45067e16c21.tar.gz
mod_auth_mellon-8dacb0388763ec4da5198b2d6063b45067e16c21.tar.xz
mod_auth_mellon-8dacb0388763ec4da5198b2d6063b45067e16c21.zip
Introduce dynamic memory pool for sessions
This pool has a fixed size and the aim is to avoid arbitrary limits on entry's components, while maintaining an overall fixed entry size. Accessors function for a storage unit are provided for future use. Signed-off-by: Simo Sorce <simo@redhat.com> git-svn-id: https://modmellon.googlecode.com/svn/trunk@231 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_config.c')
-rw-r--r--auth_mellon_config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/auth_mellon_config.c b/auth_mellon_config.c
index 36f6b96..0de3f96 100644
--- a/auth_mellon_config.c
+++ b/auth_mellon_config.c
@@ -863,6 +863,15 @@ const command_rec auth_mellon_commands[] = {
" take effect. The default value is 100."
),
AP_INIT_TAKE1(
+ "MellonCacheEntrySize",
+ am_set_module_config_int_slot,
+ (void *)APR_OFFSETOF(am_mod_cfg_rec, entry_size),
+ RSRC_CONF,
+ "The maximum size for a single session entry. You must"
+ " restart the server before any changes to this directive will"
+ " take effect. The default value is 192KiB."
+ ),
+ AP_INIT_TAKE1(
"MellonLockFile",
am_set_module_config_file_slot,
(void *)APR_OFFSETOF(am_mod_cfg_rec, lock_file),
@@ -1571,8 +1580,11 @@ void *auth_mellon_server_config(apr_pool_t *p, server_rec *s)
mod->post_count = post_count;
mod->post_size = post_size;
+ mod->entry_size = AM_CACHE_DEFAULT_ENTRY_SIZE;
+
mod->init_cache_size = 0;
mod->init_lock_file = NULL;
+ mod->init_entry_size = 0;
mod->cache = NULL;
mod->lock = NULL;