From 36ab0775e1c5ec4352f36074cea8bfbe49302b80 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 25 Apr 2004 00:08:47 +0000 Subject: Moved some common directives to the main config parser. --- daemon/httpauthd.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'daemon/httpauthd.c') diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c index f640b5d..a2985a3 100644 --- a/daemon/httpauthd.c +++ b/daemon/httpauthd.c @@ -904,7 +904,8 @@ int config_parse(const char* file, ha_buffer_t* buf) /* These are the default options for the contexts */ memset(&defaults, 0, sizeof(defaults)); defaults.types = 0xFFFFFFFF; /* All types by default */ - defaults.timeout = DEFAULT_TIMEOUT; /* Timeout for cache */ + defaults.cache_timeout = DEFAULT_TIMEOUT; /* Timeout for cache */ + defaults.cache_max = DEFAULT_CACHEMAX; ha_bufreset(buf); @@ -1032,7 +1033,17 @@ int config_parse(const char* file, ha_buffer_t* buf) if(ha_confint(name, value, 0, 86400, &v) == HA_ERROR) exit(1); /* Message already printed */ - (ctx ? ctx : &defaults)->timeout = v; + (ctx ? ctx : &defaults)->cache_timeout = v; + recog = 1; + } + + else if(strcmp(name, "cachemax") == 0) + { + int v; + if(ha_confint(name, value, 0, 0x7FFFFFFF, &v) == HA_ERROR) + exit(1); /* Message already printed */ + + (ctx ? ctx : &defaults)->cache_max = v; recog = 1; } -- cgit v1.2.3