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;
}
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)
/*
- * $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
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
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;
fake->ping_status = PING_WAITING;
eventAdd("peerCountMcastPeersDone",
peerCountMcastPeersDone,
- p,
+ psstate,
Config.neighborTimeout);
p->mcast.flags |= PEER_COUNTING;
peerCountMcastPeersSchedule(p, MCAST_COUNT_RATE);
fake->store_status = STORE_ABORTED;
storeReleaseRequest(fake);
storeUnlockObject(fake);
+ xfree(psstate);
}
static void
/*
- * $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
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);