/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
hash_first(hash);
while ((e = (CacheEntry *)hash_next(hash))) {
- cacheDigestAdd(cache->digest, e->key);
+ cache->digest->add(e->key);
}
gettimeofday(&t_end, NULL);
cacheQueryPeer(Cache * cache, const cache_key * key)
{
const int peer_has_it = hash_lookup(cache->peer->hash, key) != NULL;
- const int we_think_we_have_it = cacheDigestTest(cache->digest, key);
+ const int we_think_we_have_it = cache->digest->test(key);
++ cache->qstats.query_count;
hash_remove_link(cache->hash, (hash_link *) olde);
if (update_digest)
- cacheDigestDel(cache->digest, s->key);
+ cache->digest->remove(s->key);
cacheEntryDestroy(olde);
++ cache->count;
if (update_digest)
- cacheDigestAdd(cache->digest, e->key);
+ cache->digest->add(e->key);
}
}
{
fprintf(stderr, "usage: %s <access_log> <swap_state> ...\n",
prg_name);
- return -1;
+ return EXIT_FAILURE;
}
int
xfree(fis);
cacheDestroy(them);
cacheDestroy(us);
- return 0;
+ return EXIT_SUCCESS;
}