/* per-peer limit */
if (req_time - pd->times.received < PeerDigestReqMinGap) {
- debugs(72, 2, "peerDigestCheck: " << pd->host.unsafeBuf() <<
+ debugs(72, 2, "peerDigestCheck: " << pd->host <<
", avoiding close peer requests (" <<
(int) (req_time - pd->times.received) << " < " <<
(int) PeerDigestReqMinGap << " secs).");
/* global limit */
if (req_time - pd_last_req_time < GlobDigestReqMinGap) {
- debugs(72, 2, "peerDigestCheck: " << pd->host.unsafeBuf() <<
+ debugs(72, 2, "peerDigestCheck: " << pd->host <<
", avoiding close requests (" <<
(int) (req_time - pd_last_req_time) << " < " <<
(int) GlobDigestReqMinGap << " secs).");
assert(reply);
assert (reply->sline.status != 0);
status = reply->sline.status;
- debugs(72, 3, "peerDigestFetchReply: " << pd->host.unsafeBuf() << " status: " << status <<
+ debugs(72, 3, "peerDigestFetchReply: " << pd->host << " status: " << status <<
", expires: " << (long int) reply->expires << " (" << std::showpos <<
(int) (reply->expires - squid_curtime) << ")");
assert (fetch->entry->getReply()->sline.status != 0);
if (fetch->entry->getReply()->sline.status != HTTP_OK) {
- debugs(72, 1, "peerDigestSwapInHeaders: " << fetch->pd->host.unsafeBuf() <<
+ debugs(72, 1, "peerDigestSwapInHeaders: " << fetch->pd->host <<
" status " << fetch->entry->getReply()->sline.status <<
" got cached!");
#endif
else
- host = pd->host.unsafeBuf();
+ host = pd->host.termedBuf();
}
debugs(72, 6, step_name << ": peer " << host << ", offset: " <<
peerDigestFetchStop(DigestFetchState * fetch, char *buf, const char *reason)
{
assert(reason);
- debugs(72, 2, "peerDigestFetchStop: peer " << fetch->pd->host.unsafeBuf() << ", reason: " << reason);
+ debugs(72, 2, "peerDigestFetchStop: peer " << fetch->pd->host << ", reason: " << reason);
peerDigestReqFinish(fetch, buf, 1, 1, 1, reason, 0);
}
peerDigestFetchAbort(DigestFetchState * fetch, char *buf, const char *reason)
{
assert(reason);
- debugs(72, 2, "peerDigestFetchAbort: peer " << fetch->pd->host.unsafeBuf() << ", reason: " << reason);
+ debugs(72, 2, "peerDigestFetchAbort: peer " << fetch->pd->host << ", reason: " << reason);
peerDigestReqFinish(fetch, buf, 1, 1, 1, reason, 1);
}
peerDigestPDFinish(DigestFetchState * fetch, int pcb_valid, int err)
{
PeerDigest *pd = fetch->pd;
- const char *host = pd->host.unsafeBuf();
+ const char *host = pd->host.termedBuf();
pd->times.received = squid_curtime;
pd->times.req_delay = fetch->resp_time;
{
StoreDigestCBlock cblock;
int freed_size = 0;
- const char *host = pd->host.unsafeBuf();
+ const char *host = pd->host.termedBuf();
xmemcpy(&cblock, buf, sizeof(cblock));
/* network -> host conversions */
const int bit_util = cacheDigestBitUtil(pd->cd);
if (bit_util > 65) {
- debugs(72, 0, "Warning: " << pd->host.unsafeBuf() <<
+ debugs(72, 0, "Warning: " << pd->host <<
" peer digest has too many bits on (" << bit_util << "%%).");
return 0;
assert(pd);
- const char *host = pd->host.unsafeBuf();
+ const char *host = pd->host.termedBuf();
storeAppendPrintf(e, "\npeer digest from %s\n", host);
cacheDigestGuessStatsReport(&pd->stats.guess, e, host);