From 66d68a58fbbeacfaa51f5210e9d6a549a677014f Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 9 Jun 2004 16:39:31 +0000 Subject: - 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 --- daemon/ntlm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'daemon/ntlm.c') diff --git a/daemon/ntlm.c b/daemon/ntlm.c index 85bee1d..37de9e8 100644 --- a/daemon/ntlm.c +++ b/daemon/ntlm.c @@ -581,6 +581,7 @@ int ntlm_init(ha_context_t* context) if(context) { ntlm_context_t* ctx = (ntlm_context_t*)(context->ctx_data); + hash_table_calls_t htc; ASSERT(ctx); @@ -604,13 +605,17 @@ int ntlm_init(ha_context_t* context) ASSERT(!ctx->established); /* Initialize our tables */ - if(!(ctx->pending = hash_create(NTLM_HASH_KEY_LEN, free_hash_object, NULL)) || - !(ctx->established = hash_create(NTLM_HASH_KEY_LEN, NULL, NULL))) + if(!(ctx->pending = hash_create(NTLM_HASH_KEY_LEN)) || + !(ctx->established = hash_create(NTLM_HASH_KEY_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->pending, &htc); + ha_messagex(LOG_INFO, "ntlm: initialized handler"); } -- cgit v1.2.3