From: wessels <> Date: Sat, 12 Dec 1998 06:45:09 +0000 (+0000) Subject: got hierarchy logging working again after new forwarding goop X-Git-Tag: SQUID_3_0_PRE1~2469 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0bdf262145d22af6972f0ad8f938174834b218c7;p=thirdparty%2Fsquid.git got hierarchy logging working again after new forwarding goop --- diff --git a/src/access_log.cc b/src/access_log.cc index bd9d0e1ef6..d4656aa734 100644 --- a/src/access_log.cc +++ b/src/access_log.cc @@ -1,7 +1,7 @@ /* - * $Id: access_log.cc,v 1.45 1998/12/11 20:06:49 wessels Exp $ + * $Id: access_log.cc,v 1.46 1998/12/11 23:45:09 wessels Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -280,7 +280,7 @@ accessLogLog(AccessLogEntry * al) xstrncpy((char *) ibuf, al->url, 364 * sizeof(int)); isize = ((strlen(al->url) + 8) / 8) * 2; mcast_encode((unsigned int *) ibuf, isize, - (const unsigned int *) Config.mcast_miss.encode_key); + (const unsigned int *) Config.mcast_miss.encode_key); comm_udp_sendto(mcast_miss_fd, &mcast_miss_to, sizeof(mcast_miss_to), ibuf, isize * sizeof(int)); @@ -339,15 +339,11 @@ accessLogClose(void) void hierarchyNote(HierarchyLogEntry * hl, hier_code code, - ping_data * pingdata, const char *cache_peer) { assert(hl != NULL); hl->code = code; - if (pingdata) - hl->ping = *pingdata; xstrncpy(hl->host, cache_peer, SQUIDHOSTNAMELEN); - hl->ping.stop = current_time; } void diff --git a/src/forward.cc b/src/forward.cc index 0f6d6ccfd6..c2786a01b6 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.34 1998/12/11 23:10:48 wessels Exp $ + * $Id: forward.cc,v 1.35 1998/12/11 23:45:10 wessels Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -72,7 +72,7 @@ fwdStateFree(FwdState * fwdState) ErrorState *err; int sfd; static int loop_detect = 0; - debug(17,3)("fwdStateFree: %p\n", fwdState); + debug(17, 3) ("fwdStateFree: %p\n", fwdState); assert(loop_detect++ == 0); assert(e->mem_obj); if (e->store_status == STORE_PENDING) { @@ -213,6 +213,7 @@ fwdConnectStart(FwdState * fwdState) host = fwdState->request->host; port = fwdState->request->port; } + hierarchyNote(&fwdState->request->hier, fs->code, host); if ((fd = pconnPop(host, port)) >= 0) { debug(17, 3) ("fwdConnectStart: reusing pconn FD %d\n", fd); fwdState->server_fd = fd; @@ -486,11 +487,11 @@ fwdComplete(FwdState * fwdState) debug(17, 3) ("ENTRY_FWD_HDR_WAIT not set, calling storeComplete\n"); storeComplete(e); } else if (fwdReforward(fwdState)) { -debug(0,0)("fwdComplete: re-forwarding %d %s\n", - e->mem_obj->reply->sline.status, - storeUrl(e)); + debug(0, 0) ("fwdComplete: re-forwarding %d %s\n", + e->mem_obj->reply->sline.status, + storeUrl(e)); if (fwdState->server_fd > -1) - fwdUnregister(fwdState->server_fd, fwdState); + fwdUnregister(fwdState->server_fd, fwdState); storeEntryReset(e); fwdStartComplete(fwdState->servers, fwdState); } else { diff --git a/src/peer_select.cc b/src/peer_select.cc index ab31527cf7..39dc9ee264 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.93 1998/12/05 07:17:36 wessels Exp $ + * $Id: peer_select.cc,v 1.94 1998/12/11 23:45:11 wessels Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -191,6 +191,7 @@ peerSelectCallback(ps_state * psstate) debug(44, 1) (" timedout = %d\n", psstate->ping.timedout); } psstate->ping.stop = current_time; + psstate->request->hier.ping = psstate->ping; if (cbdataValid(data)) { psstate->servers = NULL; psstate->callback(fs, data); diff --git a/src/protos.h b/src/protos.h index 47acc0ad35..1c612df2de 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.295 1998/12/11 21:01:15 wessels Exp $ + * $Id: protos.h,v 1.296 1998/12/11 23:45:12 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -36,7 +36,7 @@ extern void accessLogRotate(void); extern void accessLogClose(void); extern void accessLogInit(void); extern const char *accessLogTime(time_t); -extern void hierarchyNote(HierarchyLogEntry *, hier_code, ping_data *, const char *); +extern void hierarchyNote(HierarchyLogEntry *, hier_code, const char *); #if FORW_VIA_DB extern void fvdbCountVia(const char *key); extern void fvdbCountForw(const char *key);