]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
misc runtime fixes
authorwessels <>
Wed, 30 Apr 1997 22:18:41 +0000 (22:18 +0000)
committerwessels <>
Wed, 30 Apr 1997 22:18:41 +0000 (22:18 +0000)
src/fd.cc
src/neighbors.cc
src/store.cc

index cad4deebfc6ab2988f89f484311c363db42f31da..24e11b4d04766b065f619759413d9c3af2a359ac 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -31,7 +31,8 @@ void
 fd_close (int fd)
 {
     FD_ENTRY *fde = &fd_table[fd];
-    fdUpdateBiggest(fd, FD_CLOSE);
+    debug(7, 1, "fd_close: FD %3d\n", fd);
+    fdUpdateBiggest(fd, fde->open = FD_CLOSE);
     memset(fde, '\0', sizeof(FD_ENTRY));
     fde->timeout = 0;
 }
@@ -40,6 +41,10 @@ void
 fd_open(int fd, unsigned int type, const char *desc)
 {
     FD_ENTRY *fde = &fd_table[fd];
+    debug(7, 1, "fd_open : FD %3d, %8.8s, %s\n",
+       fd,
+       fdstatTypeStr[type],
+       desc ? desc : "N/A");
     fde->type = type;
     fdUpdateBiggest(fd, fde->open = FD_OPEN);
     if (desc)
index b4a331fbb80ba5e2b171d2442931ab7a12ac376a..5ebd95031dd55f7a68ee16f0735d04ccb5cd10ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.133 1997/04/30 03:44:16 wessels Exp $
+ * $Id: neighbors.cc,v 1.134 1997/04/30 16:18:43 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -177,12 +177,13 @@ hierarchyNote(request_t * request,
     icp_ping_data * icpdata,
     const char *cache_host)
 {
-    if (request) {
-       request->hierarchy.code = code;
-       request->hierarchy.icp = *icpdata;
-       request->hierarchy.host = xstrdup(cache_host);
-       request->hierarchy.icp.stop = current_time;
-    }
+    if (request == NULL)
+       return;
+    request->hierarchy.code = code;
+    if (icpdata)
+        request->hierarchy.icp = *icpdata;
+    request->hierarchy.host = xstrdup(cache_host);
+    request->hierarchy.icp.stop = current_time;
 }
 
 static peer_t
@@ -1068,6 +1069,7 @@ peerCountMcastPeersStart(void *data)
     psstate->callback_data = p;
     psstate->icp.start = current_time;
     mem = fake->mem_obj;
+    mem->request = requestLink(psstate->request);
     mem->start_ping = current_time;
     mem->icp_reply_callback = peerCountHandleIcpReply;
     mem->ircb_data = psstate;
@@ -1082,7 +1084,7 @@ peerCountMcastPeersStart(void *data)
     fake->ping_status = PING_WAITING;
     eventAdd("peerCountMcastPeersDone",
        peerCountMcastPeersDone,
-       p,
+       psstate,
        Config.neighborTimeout);
     p->mcast.flags |= PEER_COUNTING;
     peerCountMcastPeersSchedule(p, MCAST_COUNT_RATE);
@@ -1112,6 +1114,7 @@ peerCountMcastPeersDone(void *data)
     fake->store_status = STORE_ABORTED;
     storeReleaseRequest(fake);
     storeUnlockObject(fake);
+    xfree(psstate);
 }
 
 static void
index bcfe1f78b27d5fddf58a17ea68d84a0b09df3586..c0991b38ee40e0f8bbc96c70b846d11fe3d8fca3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.225 1997/04/29 22:13:09 wessels Exp $
+ * $Id: store.cc,v 1.226 1997/04/30 16:18:44 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -2606,6 +2606,7 @@ storeWriteCleanLogs(void)
            debug(50, 0, "storeWriteCleanLogs: %s: %s\n", new[dirn], xstrerror());
            continue;
        }
+       fd_open(fd[dirn], FD_FILE, new[dirn]);
 #if HAVE_FCHMOD
        if (stat(cur[dirn], &sb) == 0)
            fchmod(fd[dirn], sb.st_mode);