]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
hash.c cleanup
authorwessels <>
Tue, 17 Jun 1997 10:54:08 +0000 (10:54 +0000)
committerwessels <>
Tue, 17 Jun 1997 10:54:08 +0000 (10:54 +0000)
src/client_db.cc
src/client_side.cc
src/fqdncache.cc
src/ipcache.cc
src/net_db.cc
src/store.cc

index 83317703fc0b0f2abe9d01686f813fb8b1d45094..6e7629fd6b6abdcc059d1730825ecbb3fec93c24 100644 (file)
@@ -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 *
index febc6e7921508f31e6681f9bbba9b7d71d1fc0c7..7f67ddf7ae53cba33efd06047ea460f3a07007d2 100644 (file)
@@ -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);
 
index bea2214e65370a1d93ad86bfa07c2aa69c366dab..18db605ee043adbce524460d898be0f05df476a2 100644 (file)
@@ -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;
 
index aa1c0c9dbc9821b98fbb06fc941833ac7edfb54c..06693e4d995800395d4c8d37f9c7bec83342ff76 100644 (file)
@@ -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;
index 0d212e9e241e4fc12235e6c4e696902b1e4b2250..91cdcf29153985c66a54834fc0e0441d713e733c 100644 (file)
@@ -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));
index f7499c179a03615abb0efdbbf3de718e50595bc3..f333b2f94fa4b0b843eff570ee17b1ecdcaa700f 100644 (file)
@@ -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);