summaryrefslogtreecommitdiff
path: root/daemon/simple.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-06-09 16:39:31 +0000
committerStef Walter <stef@memberwebs.com>2004-06-09 16:39:31 +0000
commit66d68a58fbbeacfaa51f5210e9d6a549a677014f (patch)
treec0bcad3aae498452aecb87ce912c405dbc612af0 /daemon/simple.c
parent80b0e2c0fdad108454ae87130496f595f0b81b81 (diff)
- Changed 'method' to 'handler' throughout
- Fixed bug in hash.c with unitialized memory - Imported new hash table features - Writes out pid file when requested with -p option
Diffstat (limited to 'daemon/simple.c')
-rw-r--r--daemon/simple.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/daemon/simple.c b/daemon/simple.c
index 8059051..52d565d 100644
--- a/daemon/simple.c
+++ b/daemon/simple.c
@@ -611,6 +611,7 @@ int simple_init(ha_context_t* context)
else
{
simple_context_t* ctx = (simple_context_t*)(context->ctx_data);
+ hash_table_calls_t htc;
int fd;
ASSERT(ctx);
@@ -644,12 +645,16 @@ int simple_init(ha_context_t* context)
ASSERT(!ctx->cache);
/* The cache for digest records and basic */
- if(!(ctx->cache = hash_create(MD5_LEN, free_hash_object, NULL)))
+ if(!(ctx->cache = hash_create(MD5_LEN)))
{
ha_messagex(LOG_CRIT, "out of memory");
return HA_CRITERROR;
}
+ htc.f_freeval = free_hash_object;
+ htc.arg = NULL;
+ hash_set_table_calls(ctx->cache, &htc);
+
ha_messagex(LOG_INFO, "simple: initialized handler");
}