]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
got hierarchy logging working again after new forwarding goop
authorwessels <>
Sat, 12 Dec 1998 06:45:09 +0000 (06:45 +0000)
committerwessels <>
Sat, 12 Dec 1998 06:45:09 +0000 (06:45 +0000)
src/access_log.cc
src/forward.cc
src/peer_select.cc
src/protos.h

index bd9d0e1ef6d0c627346a95a76a09cb37f9db7943..d4656aa734694d3eab0d9db526a90ac1bb676d9a 100644 (file)
@@ -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
index 0f6d6ccfd61f4758080e528779e8f653e0071403..c2786a01b6cc2f90a26c57aa93fdc0b5f9c3343e 100644 (file)
@@ -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 {
index ab31527cf7a82e8a28ac7f57e5f02bce95f97248..39dc9ee264440bed08f9d282eddba1c789a3651d 100644 (file)
@@ -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);
index 47acc0ad356e3e899b4ca1b8c2db4146aae45b00..1c612df2ded597b252473faf1fff78e12f06bf2a 100644 (file)
@@ -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);