and ALIVE neighbors (Joe Ramey).
- Fixed FTP directory parsing bugs.
- Fixed daylight savings time bug (again).
+ - Changed error message to 'Generated TIME by HOST (SQUID/VER)'
+ because any string with an '@' must be an email address.
+
Changes to squid-1.2.beta19 (Apr 8, 1998):
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.121 1998/04/24 06:00:01 wessels Exp $
+dnl $Id: configure.in,v 1.122 1998/04/24 06:08:14 wessels Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.121 $)dnl
+AC_REVISION($Revision: 1.122 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(cfgaux)
fi
])
-AC_ARG_ENABLE(cache-digest,
-[ --enable-cache-digest Maintain a digest of our cache ],
+AC_ARG_ENABLE(cache-digests,
+[ --enable-cache-digests Use Cache Digests],
[ if test "$enableval" = "yes" ; then
- echo "SQUID_MAINTAIN_CACHE_DIGEST enabled"
- AC_DEFINE(SQUID_MAINTAIN_CACHE_DIGEST)
- fi
-])
-
-AC_ARG_ENABLE(peer-digests,
-[ --enable-peer-digests Query peers for their cache digests],
-[ if test "$enableval" = "yes" ; then
- echo "SQUID_PEER_DIGEST enabled"
- AC_DEFINE(SQUID_PEER_DIGEST)
+ echo "USE_CACHE_DIGESTS enabled"
+ AC_DEFINE(USE_CACHE_DIGESTS)
fi
])
/*
- * $Id: CacheDigest.cc,v 1.15 1998/04/22 16:20:55 rousskov Exp $
+ * $Id: CacheDigest.cc,v 1.16 1998/04/24 06:08:15 wessels Exp $
*
* DEBUG: section 70 Cache Digest
* AUTHOR: Alex Rousskov
CBIT_SET(cd->mask, hashed_keys[3]);
on_xition_cnt++;
}
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
statHistCount(&Counter.cd.on_xition_count, on_xition_cnt);
#endif
}
/*
- * $Id: client_side.cc,v 1.289 1998/04/24 05:05:10 wessels Exp $
+ * $Id: client_side.cc,v 1.290 1998/04/24 06:08:16 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
{
int svc_time = tvSubMsec(http->start, current_time);
icp_ping_data *i;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
const HttpReply *reply = NULL;
int sst = 0; /* server-side service time */
HierarchyLogEntry *H;
statHistCount(&Counter.icp.query_svc_time, tvSubUsec(i->start, i->stop));
if (i->timeout)
Counter.icp.query_timeouts++;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
H = &http->request->hier;
if (H->peer_select_start.tv_sec && H->store_complete_stop.tv_sec)
sst = tvSubMsec(H->peer_select_start, H->store_complete_stop);
}
/*
* account for outgoing digest traffic (this has nothing to do with
- * SQUID_PEER_DIGEST, but counters are all in SQUID_PEER_DIGEST ifdefs)
+ * USE_CACHE_DIGESTS, but counters are all in USE_CACHE_DIGESTS ifdefs)
*/
if (http->flags.internal && strStr(http->request->urlpath, StoreDigestUrlPath)) {
kb_incr(&Counter.cd.kbytes_sent, http->out.size);
isTcpHit(http->log_type) ? "HIT" : "MISS",
getMyHostname());
clientAppendReplyHeader(hdr_out, ybuf, &len, out_sz);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
/* Append X-Cache-Lookup: -- temporary hack, to be removed @?@ @?@ */
snprintf(ybuf, 4096, "X-Cache-Lookup: %s from %s:%d",
http->lookup_type ? http->lookup_type : "NONE",
const cache_key *key = storeKeyPublic(http->uri, r->method);
StoreEntry *e;
e = http->entry = storeGet(key);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
http->lookup_type = e ? "HIT" : "MISS";
#endif
if (!e) {
NO_DIRECT_FAIL,
SOURCE_FASTEST,
ROUNDROBIN_PARENT,
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
CACHE_DIGEST_HIT,
NO_CACHE_DIGEST_DIRECT,
#endif
/*
- * $Id: neighbors.cc,v 1.199 1998/04/23 19:29:12 wessels Exp $
+ * $Id: neighbors.cc,v 1.200 1998/04/24 06:08:18 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
lookup_t
peerDigestLookup(peer *p, request_t * request, StoreEntry * entry)
{
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
const cache_key *key = request ? storeKeyPublic(storeUrl(entry), request->method) : NULL;
assert(p);
assert(request);
neighborsDigestSelect(request_t * request, StoreEntry * entry)
{
peer *best_p = NULL;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
const cache_key *key;
int best_rtt = 0;
int choice_count = 0;
void
peerNoteDigestLookup(request_t * request, peer *p, lookup_t lookup)
{
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
if (p)
strncpy(request->hier.cd_host, p->host, sizeof(request->hier.cd_host));
else
/*
- * $Id: peer_digest.cc,v 1.17 1998/04/23 03:21:17 rousskov Exp $
+ * $Id: peer_digest.cc,v 1.18 1998/04/24 06:08:19 wessels Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
#include "squid.h"
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
/* local types */
/*
- * $Id: peer_select.cc,v 1.52 1998/04/22 16:24:14 rousskov Exp $
+ * $Id: peer_select.cc,v 1.53 1998/04/24 06:08:20 wessels Exp $
*
* DEBUG: section 44 Peer Selection Algorithm
* AUTHOR: Duane Wessels
"NO_DIRECT_FAIL",
"SOURCE_FASTEST",
"ROUNDROBIN_PARENT",
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
"CACHE_DIGEST_HIT",
"NO_CACHE_DIGEST_DIRECT",
#endif
psstate->callback = callback;
psstate->fail_callback = fail_callback;
psstate->callback_data = callback_data;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
request->hier.peer_select_start = current_time;
#endif
cbdataLock(callback_data);
debug(44, 3) ("peerSelect: found single parent, skipping ICP query\n");
} else if (peerSelectIcpPing(request, direct, entry)) {
assert(entry->ping_status == PING_NONE);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
/* which algorithm to use? */
if (squid_random() & 1) {
debug(44, 2) ("peerSelect: Using Cache Digest\n");
Config.neighborTimeout);
return;
}
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
}
#endif
}
debug(44, 3) ("peerHandleIcpReply: %s %s\n",
icp_opcode_str[op],
storeUrl(psstate->entry));
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
/* do cd lookup to count false misses */
if (p && request)
peerNoteDigestLookup(request, p,
/*
- * $Id: stat.cc,v 1.243 1998/04/22 16:24:13 rousskov Exp $
+ * $Id: stat.cc,v 1.244 1998/04/24 06:08:21 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
storeAppendPrintf(sentry, "client_http.hit_median_svc_time = %f seconds\n",
x / 1000.0);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
storeAppendPrintf(sentry, "cd.msgs_sent = %f/sec\n",
XAVG(cd.msgs_sent));
storeAppendPrintf(sentry, "cd.msgs_recv = %f/sec\n",
* DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
*/
statHistLogInit(&C->dns.svc_time, 300, 0.0, 60000.0 * 10.0);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
/*
* Digested and ICPed cvs times in milli-seconds; max of 3 hours.
*/
statHistClean(&C->icp.query_svc_time);
statHistClean(&C->icp.reply_svc_time);
statHistClean(&C->dns.svc_time);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
statHistClean(&C->cd.client_svc_time);
statHistClean(&C->icp.client_svc_time);
statHistClean(&C->cd.server_svc_time);
statHistCopy(&dest->icp.query_svc_time, &orig->icp.query_svc_time);
statHistCopy(&dest->icp.reply_svc_time, &orig->icp.reply_svc_time);
statHistCopy(&dest->dns.svc_time, &orig->dns.svc_time);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
statHistCopy(&dest->cd.client_svc_time, &orig->cd.client_svc_time);
statHistCopy(&dest->icp.client_svc_time, &orig->icp.client_svc_time);
statHistCopy(&dest->cd.server_svc_time, &orig->cd.server_svc_time);
static void
statCountersHistograms(StoreEntry * sentry)
{
- StatCounters *f = &Counter;
#if TOO_MUCH_OUTPUT
storeAppendPrintf(sentry, "client_http.all_svc_time histogram:\n");
statHistDump(&f->client_http.all_svc_time, sentry, NULL);
storeAppendPrintf(sentry, "client_http.hit_svc_time histogram:\n");
statHistDump(&f->client_http.hit_svc_time, sentry, NULL);
#endif
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
+ StatCounters *f = &Counter;
storeAppendPrintf(sentry, "\nicp.query_svc_time histogram:\n");
statHistDump(&f->icp.query_svc_time, sentry, NULL);
storeAppendPrintf(sentry, "\nicp.reply_svc_time histogram:\n");
storeAppendPrintf(sentry, "icp.r_kbytes_recv = %d\n",
(int) f->icp.r_kbytes_recv.kb);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
storeAppendPrintf(sentry, "icp.times_used = %d\n",
f->icp.times_used);
storeAppendPrintf(sentry, "cd.times_used = %d\n",
static void
statPeerSelect(StoreEntry * sentry)
{
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
StatCounters *f = &Counter;
peer *peer;
const int tot_used = f->cd.times_used + f->icp.times_used;
/*
- * $Id: store.cc,v 1.408 1998/04/22 16:22:37 rousskov Exp $
+ * $Id: store.cc,v 1.409 1998/04/24 06:08:22 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
assert(e->mem_status == NOT_IN_MEMORY);
if (!storeEntryValidLength(e))
EBIT_SET(e->flag, ENTRY_BAD_LENGTH);
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
if (e->mem_obj->request)
e->mem_obj->request->hier.store_complete_stop = current_time;
#endif
/*
- * $Id: store_digest.cc,v 1.9 1998/04/22 16:22:58 rousskov Exp $
+ * $Id: store_digest.cc,v 1.10 1998/04/24 06:08:24 wessels Exp $
*
* DEBUG: section 71 Store Digest Manager
* AUTHOR: Alex Rousskov
void
storeDigestInit()
{
-#if SQUID_MAINTAIN_CACHE_DIGEST
+#if USE_CACHE_DIGESTS
const int cap = storeDigestCalcCap();
store_digest = cacheDigestCreate(cap, StoreDigestBitsPerEntry);
debug(71, 1) ("Local cache digest enabled; rebuild/rewrite every %d/%d sec\n",
hier_code code;
char host[SQUIDHOSTNAMELEN];
icp_ping_data icp;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
char cd_host[SQUIDHOSTNAMELEN]; /* the host of selected by cd peer */
peer_select_alg_t alg; /* peer selection algorithm */
lookup_t cd_lookup; /* cd prediction: none, miss, hit */
StoreEntry *entry;
StoreEntry *old_entry;
log_type log_type;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
const char *lookup_type; /* temporary hack: storeGet() result: HIT/MISS/NONE */
#endif
http_status http_code;
StatHist query_svc_time;
StatHist reply_svc_time;
int query_timeouts;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
StatHist client_svc_time;
StatHist server_svc_time;
int times_used;
struct {
StatHist svc_time;
} dns;
-#if SQUID_PEER_DIGEST
+#if USE_CACHE_DIGESTS
struct {
int times_used;
kb_t kbytes_sent;