]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- polish
authorrousskov <>
Wed, 22 Apr 1998 22:24:12 +0000 (22:24 +0000)
committerrousskov <>
Wed, 22 Apr 1998 22:24:12 +0000 (22:24 +0000)
src/acl.cc
src/neighbors.cc
src/peer_select.cc
src/stat.cc
src/store_rebuild.cc

index cf806dedf9f7eca9781e5fab4ed7b95767b4404a..93073626d1d8e9a3be8ba3d9c42a4fc78092a437 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.160 1998/04/16 18:06:32 wessels Exp $
+ * $Id: acl.cc,v 1.161 1998/04/22 16:24:12 rousskov Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -1402,12 +1402,14 @@ int
 aclCheckFast(const acl_access * A, aclCheck_t * checklist)
 {
     int allow = 0;
+    debug(28, 5) ("aclCheckFast: list: %p\n", A);
     while (A) {
        allow = A->allow;
        if (aclMatchAclList(A->acl_list, checklist))
            return allow;
        A = A->next;
     }
+    debug(28, 5) ("aclCheckFast: no matches, returning: %d\n", !allow);
     return !allow;
 }
 
index 13f9aec994c5290c9a6b32f3a869759a49f5d4c1..bc5fcd9e5367700ed7180a19cf6de6f8f6be9da5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.197 1998/04/21 16:40:50 wessels Exp $
+ * $Id: neighbors.cc,v 1.198 1998/04/22 16:24:15 rousskov Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -552,8 +552,9 @@ lookup_t
 peerDigestLookup(peer *p, request_t * request, StoreEntry * entry)
 {
 #if SQUID_PEER_DIGEST
-    const cache_key *key = storeKeyPublic(storeUrl(entry), request->method);
+    const cache_key *key = request ? storeKeyPublic(storeUrl(entry), request->method) : NULL;
     assert(p);
+    assert(request);
     debug(15, 5) ("neighborsDigestPeerLookup: peer %s\n", p->host);
        /* does the peeer have a valid digest? */
     if (EBIT_TEST(p->digest.flags, PD_DISABLED)) {
index 654a6db1d2a845ab63aedcf2e5ad0e206091adb0..66d7fbe014ad64800677cae60d7174301882c12a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.51 1998/04/18 05:41:54 rousskov Exp $
+ * $Id: peer_select.cc,v 1.52 1998/04/22 16:24:14 rousskov Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -310,7 +310,7 @@ peerSelectFoo(ps_state * psstate)
 #if SQUID_PEER_DIGEST
        /* which algorithm to use? */
        if (squid_random() & 1) {
-           debug(44, 3) ("peerSelect: Using Cache Digest\n");
+           debug(44, 2) ("peerSelect: Using Cache Digest\n");
            request->hier.alg = PEER_SA_DIGEST;
            if (1 /* global_digested_peer_count */)
                p = neighborsDigestSelect(request, entry);
@@ -322,7 +322,7 @@ peerSelectFoo(ps_state * psstate)
            case LOOKUP_HIT:
                assert(p);
                code = CACHE_DIGEST_HIT;
-               debug(44, 3) ("peerSelect: %s/%s\n", hier_strings[code], p->host);
+               debug(44, 2) ("peerSelect: %s/%s\n", hier_strings[code], p->host);
                hierarchyNote(&request->hier, code, &psstate->icp, p->host);
                peerSelectCallback(psstate, p); /* @?@: p used to be NULL */
                return;
@@ -331,7 +331,7 @@ peerSelectFoo(ps_state * psstate)
                /* fall through */
            case LOOKUP_NONE:
                /* go direct */
-               debug(44, 3) ("peerSelect: %s/%s\n", hier_strings[code], request->host);
+               debug(44, 2) ("peerSelect: %s/%s\n", hier_strings[code], request->host);
                hierarchyNote(&request->hier, code, &psstate->icp, request->host);
                peerSelectCallback(psstate, NULL);
                return;
index cccff0b455739560f065764aff94dad32b46782d..ba8bc05c22731921745773620bf11c9dc650525d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.242 1998/04/22 05:41:11 wessels Exp $
+ * $Id: stat.cc,v 1.243 1998/04/22 16:24:13 rousskov Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -886,7 +886,7 @@ statCountersInitSpecial(StatCounters * C)
     statHistLogInit(&C->icp.server_svc_time, 300, 0.0, 3600000.0 * 30.0);
     statHistEnumInit(&C->cd.peer_choice_count, Config.npeers);
     statHistEnumInit(&C->cd.peer_ichoice_count, Config.npeers);
-    statHistEnumInit(&C->cd.on_xition_count, CacheDigestHashCount);
+    statHistEnumInit(&C->cd.on_xition_count, CacheDigestHashFuncCount);
 #endif
 }
 
index 28e4f35cfd3246011229b21dab14fa4fd377ddfa..f3d66679f2f057a8b4c80cd9d0f1aff127d74a58 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store_rebuild.cc,v 1.33 1998/04/08 00:42:25 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.34 1998/04/22 16:24:16 rousskov Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -593,7 +593,7 @@ storeCleanup(void *datanotused)
        if (opt_store_doublecheck)
            assert(store_errors == 0);
        if (store_digest)
-           storeDigestRewriteStart(NULL);
+           storeDigestNoteStoreReady();
        return;
     }
     link_next = hash_get_bucket(store_table, bucketnum);
@@ -744,10 +744,6 @@ storeRebuildStart(void)
     int i;
     memset(&RebuildState, '\0', sizeof(RebuildState));
     RebuildState.start = squid_curtime;
-#if OLD_CODE
-    if (store_digest)
-       storeDigestRewriteStart("store-rebuild");
-#endif
     for (i = 0; i < Config.cacheSwap.n_configured; i++) {
        d = xcalloc(1, sizeof(rebuild_dir));
        d->dirn = i;