From: wessels <> Date: Tue, 17 Jun 1997 10:54:08 +0000 (+0000) Subject: hash.c cleanup X-Git-Tag: SQUID_3_0_PRE1~4938 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76dd121587f57ba83c022fa33a4253e52c909621;p=thirdparty%2Fsquid.git hash.c cleanup --- diff --git a/src/client_db.cc b/src/client_db.cc index 83317703fc..6e7629fd6b 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -1,6 +1,6 @@ /* - * $Id: client_db.cc,v 1.11 1997/05/15 01:06:51 wessels Exp $ + * $Id: client_db.cc,v 1.12 1997/06/17 04:54:08 wessels Exp $ * * DEBUG: section 0 Client Database * AUTHOR: Duane Wessels @@ -43,8 +43,7 @@ typedef struct _client_info { int client_info_sz; -static HashID client_table = 0; - +static hash_table * client_table = NULL; static ClientInfo *clientdbAdd _PARAMS((struct in_addr addr)); static ClientInfo * diff --git a/src/client_side.cc b/src/client_side.cc index febc6e7921..7f67ddf7ae 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.111 1997/06/04 06:15:47 wessels Exp $ + * $Id: client_side.cc,v 1.112 1997/06/17 04:54:08 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -202,7 +202,7 @@ proxyAuthenticate(const char *headers) * table of users and passwords handy */ static time_t last_time = 0; static time_t change_time = 0; - static HashID validated = 0; + static hash_table * validated = NULL; static char *passwords = NULL; LOCAL_ARRAY(char, sent_user, ICP_IDENT_SZ); diff --git a/src/fqdncache.cc b/src/fqdncache.cc index bea2214e65..18db605ee0 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.55 1997/06/04 06:15:53 wessels Exp $ + * $Id: fqdncache.cc,v 1.56 1997/06/17 04:54:09 wessels Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -158,7 +158,7 @@ static void fqdncacheChangeKey _PARAMS((fqdncache_entry * i)); static void fqdncacheLockEntry _PARAMS((fqdncache_entry * f)); static void fqdncacheUnlockEntry _PARAMS((fqdncache_entry * f)); -static HashID fqdn_table = 0; +static hash_table * fqdn_table = NULL; static struct fqdncacheQueueData *fqdncacheQueueHead = NULL; static struct fqdncacheQueueData **fqdncacheQueueTailP = &fqdncacheQueueHead; diff --git a/src/ipcache.cc b/src/ipcache.cc index aa1c0c9dbc..06693e4d99 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.122 1997/06/17 03:03:22 wessels Exp $ + * $Id: ipcache.cc,v 1.123 1997/06/17 04:54:11 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -159,7 +159,7 @@ static void ipcacheChangeKey _PARAMS((ipcache_entry * i)); static UNREG ipcacheUnregister; static ipcache_addrs static_addrs; -static HashID ip_table = 0; +static hash_table * ip_table = NULL; static struct ipcacheQueueData *ipcacheQueueHead = NULL; static struct ipcacheQueueData **ipcacheQueueTailP = &ipcacheQueueHead; static int queue_length = 0; diff --git a/src/net_db.cc b/src/net_db.cc index 0d212e9e24..91cdcf2915 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -1,6 +1,6 @@ /* - * $Id: net_db.cc,v 1.40 1997/06/17 03:03:25 wessels Exp $ + * $Id: net_db.cc,v 1.41 1997/06/17 04:54:11 wessels Exp $ * * DEBUG: section 37 Network Measurement Database * AUTHOR: Duane Wessels @@ -33,8 +33,8 @@ #if USE_ICMP -static HashID addr_table = 0; -static HashID host_table = 0; +static hash_table * addr_table = NULL; +static hash_table * host_table = NULL; static struct in_addr networkFromInaddr _PARAMS((struct in_addr a)); static void netdbRelease _PARAMS((netdbEntry * n)); diff --git a/src/store.cc b/src/store.cc index f7499c179a..f333b2f94f 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.254 1997/06/17 03:44:35 wessels Exp $ + * $Id: store.cc,v 1.255 1997/06/17 04:54:12 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -247,7 +247,7 @@ typedef struct swapout_ctrl_t { int store_rebuilding = 1; /* Static Functions */ -static HashID storeCreateHashTable _PARAMS((int (*)_PARAMS((const char *, const char *)))); +static void storeCreateHashTable _PARAMS((int (*)_PARAMS((const char *, const char *)))); static int compareLastRef _PARAMS((StoreEntry **, StoreEntry **)); static int compareSize _PARAMS((StoreEntry **, StoreEntry **)); static int compareBucketOrder _PARAMS((struct _bucketOrder *, struct _bucketOrder *)); @@ -302,9 +302,9 @@ static int storeGetUnusedFileno _PARAMS((void)); /* Now, this table is inaccessible to outsider. They have to use a method * to access a value in internal storage data structure. */ -static HashID store_table = 0; +static hash_table * store_table = NULL; /* hash table for in-memory-only objects */ -static HashID in_mem_table = 0; +static hash_table * in_mem_table = NULL; /* current memory storage size */ unsigned long store_mem_size = 0; @@ -425,12 +425,11 @@ destroy_MemObjectData(MemObject * mem) * objects in the memory. */ -static HashID -storeCreateHashTable(int (*cmp_func) (const char *, const char *)) +static void +storeCreateHashTable(HASHCMP *cmp_func) { store_table = hash_create(cmp_func, store_buckets, hash4); in_mem_table = hash_create(cmp_func, STORE_IN_MEM_BUCKETS, hash4); - return store_table; } static void @@ -1404,7 +1403,6 @@ storeDoRebuildFromDisk(void *data) /* junk old, load new */ storeRelease(e); /* release old entry */ RB->dupcount++; - continue; } else { /* URL doesnt exist, swapfile not in use */ /* load new */ @@ -1564,6 +1562,7 @@ storeRebuiltFromDisk(struct storeRebuildState *data) debug(20, 1) (" Took %d seconds (%6.1lf objects/sec).\n", r > 0 ? r : 0, (double) data->objcount / (r > 0 ? r : 1)); debug(20, 1) (" store_swap_size = %dk\n", store_swap_size); +debug(0,0)("meta_data.store_entries=%d\n", meta_data.store_entries); if (data->need_to_validate) { debug(20, 1) ("Beginning Validation Procedure\n"); eventAdd("storeCleanup", storeCleanup, NULL, 0);