called. Removed most of the 'page_ptr' cruft in other data strucutres.
-Combined hierarchy.log into access.log
-Changed some stray comm_write()'s into icpSendERROR()'s
/*
- * $Id: comm.cc,v 1.40 1996/07/19 17:37:39 wessels Exp $
+ * $Id: comm.cc,v 1.41 1996/07/20 03:16:49 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
rw_complete_handler *handler;
void *handler_data;
int handle_immed;
+ void (*free)(void *);
};
/* GLOBAL */
static void commSetNoLinger _PARAMS((int));
static void comm_select_incoming _PARAMS((void));
static int commBind _PARAMS((int s, struct in_addr, u_short port));
+static void RWStateFree _PARAMS((int fd, RWStateData *, int code));
#ifdef TCP_NODELAY
static void commSetTcpNoDelay _PARAMS((int));
#endif
static int *fd_lifetime = NULL;
static struct timeval zero_tv;
+static void RWStateFree(fd, RWState, code)
+ int fd;
+ RWStateData *RWState;
+ int code;
+{
+ rw_complete_handler *callback = NULL;
+ if (RWState == NULL)
+ return;
+ if (RWState->free) {
+ RWState->free(RWState->buf);
+ RWState->buf = NULL;
+ }
+ callback = RWState->handler;
+ RWState->handler = NULL;
+ if (callback) {
+ callback(fd,
+ RWState->buf,
+ RWState->offset,
+ code,
+ RWState->handler_data);
+ }
+ safe_free(RWState);
+}
+
/* Return the local port associated with fd. */
u_short comm_local_port(fd)
int fd;
{
struct sockaddr_in addr;
int addr_len = 0;
+ FD_ENTRY *fde = &fd_table[fd];
/* If the fd is closed already, just return */
- if (!fd_table[fd].openned) {
+ if (!fde->openned) {
debug(5, 0, "comm_local_port: FD %d has been closed.\n", fd);
return 0;
}
- if (fd_table[fd].local_port)
- return fd_table[fd].local_port;
+ if (fde->local_port)
+ return fde->local_port;
addr_len = sizeof(addr);
if (getsockname(fd, (struct sockaddr *) &addr, &addr_len)) {
debug(5, 1, "comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD %d: %s\n", fd, xstrerror());
return 0;
}
debug(5, 6, "comm_local_port: FD %d: sockaddr %u.\n", fd, addr.sin_addr.s_addr);
- fd_table[fd].local_port = ntohs(addr.sin_port);
- return fd_table[fd].local_port;
+ fde->local_port = ntohs(addr.sin_port);
+ return fde->local_port;
}
static int commBind(s, in_addr, port)
return sock;
}
-int comm_close(fd)
+void comm_close(fd)
int fd;
{
FD_ENTRY *conn = NULL;
struct close_handler *ch = NULL;
debug(5, 5, "comm_close: FD %d\n", fd);
- if (fd < 0)
- return -1;
+ if (fd < 0 || fd >= FD_SETSIZE)
+ return;
+ conn = &fd_table[fd];
+ if (!conn->openned)
+ return;
if (fdstatGetType(fd) == FD_FILE) {
debug(5, 0, "FD %d: Someone called comm_close() on a File\n", fd);
fatal_dump(NULL);
}
- conn = &fd_table[fd];
- safe_free(conn->rstate);
- safe_free(conn->wstate);
+ conn->openned = 0;
+ RWStateFree(fd, conn->rstate, COMM_ERROR);
+ RWStateFree(fd, conn->wstate, COMM_ERROR);
comm_set_fd_lifetime(fd, -1); /* invalidate the lifetime */
- /* update fdstat */
- fdstat_close(fd);
- /* Call close handlers */
- while ((ch = conn->close_handler)) {
+ fdstat_close(fd); /* update fdstat */
+ while ((ch = conn->close_handler)) { /* Call close handlers */
conn->close_handler = ch->next;
ch->handler(fd, ch->data);
safe_free(ch);
}
memset(conn, '\0', sizeof(FD_ENTRY));
- return close(fd);
+ close(fd);
}
/* use to clean up fdtable when socket is closed without
int fd;
{
FD_ENTRY *conn = &fd_table[fd];
- safe_free(conn->rstate);
- safe_free(conn->wstate);
+ RWStateFree(fd, conn->rstate, COMM_ERROR);
+ RWStateFree(fd, conn->wstate, COMM_ERROR);
memset(conn, 0, sizeof(FD_ENTRY));
return 0;
}
{
int fd;
time_t lft;
+ FD_ENTRY *fde = NULL;
int (*func) () = NULL;
if (lft > squid_curtime)
continue;
debug(5, 5, "checkLifetimes: FD %d Expired\n", fd);
- if ((func = fd_table[fd].lifetime_handler)) {
+ fde = &fd_table[fd];
+ if ((func = fde->lifetime_handler)) {
debug(5, 5, "checkLifetimes: FD %d: Calling lifetime handler\n", fd);
- func(fd, fd_table[fd].lifetime_data);
- fd_table[fd].lifetime_handler = NULL;
- } else if ((func = fd_table[fd].read_handler)) {
+ func(fd, fde->lifetime_data);
+ fde->lifetime_handler = NULL;
+ } else if ((func = fde->read_handler)) {
debug(5, 5, "checkLifetimes: FD %d: Calling read handler\n", fd);
- func(fd, fd_table[fd].read_data);
- fd_table[fd].read_handler = NULL;
- } else if ((func = fd_table[fd].read_handler)) {
+ func(fd, fde->read_data);
+ fde->read_handler = NULL;
+ } else if ((func = fde->read_handler)) {
debug(5, 5, "checkLifetimes: FD %d: Calling read handler\n", fd);
- func(fd, fd_table[fd].read_data);
- fd_table[fd].read_handler = NULL;
- } else if ((func = fd_table[fd].write_handler)) {
+ func(fd, fde->read_data);
+ fde->read_handler = NULL;
+ } else if ((func = fde->write_handler)) {
debug(5, 5, "checkLifetimes: FD %d: Calling write handler\n", fd);
- func(fd, fd_table[fd].write_data);
- fd_table[fd].write_handler = NULL;
+ func(fd, fde->write_data);
+ fde->write_handler = NULL;
} else {
debug(5, 5, "checkLifetimes: FD %d: No handlers, calling comm_close()\n", fd);
comm_close(fd);
comm_cleanup_fd_entry(fd);
}
- if (fd_table[fd].openned) {
+ if (fde->openned) {
/* still opened */
debug(5, 5, "checkLifetimes: FD %d: Forcing comm_close()\n", fd);
comm_close(fd);
debug(5, 5, "commHandleRead: FD %d: read %d bytes\n", fd, len);
if (len <= 0) {
- switch (errno) {
-#if EAGAIN != EWOULDBLOCK
- case EAGAIN:
-#endif
- case EWOULDBLOCK:
+ if (errno == EWOULDBLOCK || errno == EAGAIN) {
/* reschedule self */
comm_set_select_handler(fd,
COMM_SELECT_READ,
(PF) commHandleRead,
state);
return COMM_OK;
- default:
+ } else {
/* Len == 0 means connection closed; otherwise would not have been
* called by comm_select(). */
debug(5, len == 0 ? 2 : 1, "commHandleRead: FD %d: read failure: %s\n",
fd, len == 0 ? "connection closed" : xstrerror());
fd_table[fd].rstate = NULL; /* The handler may issue a new read */
- /* Notify caller that we failed */
- state->handler(fd,
- state->buf,
- state->offset,
- COMM_ERROR,
- state->handler_data);
- safe_free(state);
+ RWStateFree(fd, state, COMM_ERROR);
return COMM_ERROR;
}
}
/* Call handler if we have read enough */
if (state->offset >= state->size || state->handle_immed) {
fd_table[fd].rstate = NULL; /* The handler may issue a new read */
- state->handler(fd,
- state->buf,
- state->offset,
- COMM_OK,
- state->handler_data);
- safe_free(state);
+ RWStateFree(fd, state, COMM_OK);
} else {
/* Reschedule until we are done */
comm_set_select_handler(fd,
state->handle_immed = immed;
state->time = squid_curtime;
state->handler_data = handler_data;
+ state->free = NULL;
comm_set_select_handler(fd,
COMM_SELECT_READ,
(PF) commHandleRead,
if (nleft != 0)
debug(5, 2, "commHandleWrite: FD %d: write failure: connection closed with %d bytes remaining.\n", fd, nleft);
fd_table[fd].wstate = NULL;
- if (state->handler)
- state->handler(fd,
- state->buf,
- state->offset,
- nleft ? COMM_ERROR : COMM_OK,
- state->handler_data);
- else
- xfree(state->buf);
- safe_free(state);
- return;
+ RWStateFree(fd, state, nleft ? COMM_ERROR : COMM_OK);
} else if (len < 0) {
/* An error */
if (errno == EWOULDBLOCK || errno == EAGAIN) {
- /* XXX: Re-install the handler rather than giving up. I hope
- * this doesn't freeze this socket due to some random OS bug
- * returning EWOULDBLOCK indefinitely. Ought to maintain a
- * retry count in state? */
debug(5, 10, "commHandleWrite: FD %d: write failure: %s.\n",
fd, xstrerror());
comm_set_select_handler(fd,
COMM_SELECT_WRITE,
(PF) commHandleWrite,
state);
- return;
+ } else {
+ debug(5, 2, "commHandleWrite: FD %d: write failure: %s.\n",
+ fd, xstrerror());
+ fd_table[fd].wstate = NULL;
+ RWStateFree(fd, state, COMM_ERROR);
}
- debug(5, 2, "commHandleWrite: FD %d: write failure: %s.\n",
- fd, xstrerror());
- /* Notify caller that we failed */
- fd_table[fd].wstate = NULL;
- if (state->handler)
- state->handler(fd,
- state->buf,
- state->offset,
- COMM_ERROR,
- state->handler_data);
- else
- xfree(state->buf);
- safe_free(state);
- return;
} else {
/* A successful write, continue */
state->offset += len;
COMM_SELECT_WRITE,
(PF) commHandleWrite,
state);
- return;
+ } else {
+ fd_table[fd].wstate = NULL;
+ RWStateFree(fd, state, COMM_OK);
}
- fd_table[fd].wstate = NULL;
- /* Notify caller that the write is complete */
- if (state->handler)
- state->handler(fd,
- state->buf,
- state->offset,
- COMM_OK,
- state->handler_data);
- else
- xfree(state->buf);
- safe_free(state);
}
}
/* Select for Writing on FD, until SIZE bytes are sent. Call
* * HANDLER when complete. */
-void comm_write(fd, buf, size, timeout, handler, handler_data)
+void comm_write(fd, buf, size, timeout, handler, handler_data, free)
int fd;
char *buf;
int size;
int timeout;
rw_complete_handler *handler;
void *handler_data;
+ void (*free)(void *);
{
RWStateData *state = NULL;
if (fd_table[fd].wstate) {
debug(5, 1, "comm_write: WARNING! FD %d: A comm_write is already active.\n", fd);
- safe_free(fd_table[fd].wstate);
+ RWStateFree(fd, fd_table[fd].wstate, COMM_ERROR);
}
state = xcalloc(1, sizeof(RWStateData));
state->buf = buf;
state->timeout = timeout;
state->time = squid_curtime;
state->handler_data = handler_data;
+ state->free = free;
comm_set_select_handler(fd,
COMM_SELECT_WRITE,
(PF) commHandleWrite,
/*
- * $Id: ftp.cc,v 1.45 1996/07/19 17:38:36 wessels Exp $
+ * $Id: ftp.cc,v 1.46 1996/07/20 03:16:50 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
char password[MAX_URL];
char *reply_hdr;
int ftp_fd;
- char *icp_page_ptr; /* Used to send proxy-http request:
- * put_free_8k_page(me) if the lifetime
- * expires */
int got_marker; /* denotes end of successful request */
int reply_hdr_state;
int authenticated; /* This ftp request is authenticated */
put_free_8k_page(ftpState->reply_hdr);
ftpState->reply_hdr = NULL;
}
- if (ftpState->icp_page_ptr) {
- put_free_8k_page(ftpState->icp_page_ptr);
- ftpState->icp_page_ptr = NULL;
- }
requestUnlink(ftpState->request);
xfree(ftpState);
return 0;
return 0;
}
errno = 0;
- IOStats.Ftp.reads++;
len = read(fd, buf, SQUID_TCP_SO_RCVBUF);
debug(9, 5, "ftpReadReply: FD %d, Read %d bytes\n", fd, len);
if (len > 0) {
+ IOStats.Ftp.reads++;
for (clen = len - 1, bin = 0; clen; bin++)
clen >>= 1;
IOStats.Ftp.read_hist[bin]++;
put_free_8k_page(buf); /* Allocated by ftpSendRequest. */
buf = NULL;
}
- ftpState->icp_page_ptr = NULL; /* So lifetime expire doesn't re-free */
-
if (errflag) {
squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
comm_close(fd);
buflen = strlen(data->request->urlpath) + 256;
buf = (char *) get_free_8k_page();
- data->icp_page_ptr = buf;
memset(buf, '\0', buflen);
path = data->request->urlpath;
strlen(buf),
30,
ftpSendComplete,
- (void *) data);
+ (void *) data,
+ put_free_8k_page);
}
void ftpConnInProgress(fd, data)
/*
- * $Id: gopher.cc,v 1.34 1996/07/19 17:38:37 wessels Exp $
+ * $Id: gopher.cc,v 1.35 1996/07/20 03:16:50 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
int cso_recno;
int len;
char *buf; /* pts to a 4k page */
- char *icp_page_ptr; /* Pts to gopherStart buffer that needs to be freed */
} GopherData;
GopherData *CreateGopherData();
entry = data->entry;
debug(10, 4, "GopherReadReplyTimeout: Timeout on %d\n url: %s\n", fd, entry->url);
squid_error_entry(entry, ERR_READ_TIMEOUT, NULL);
- if (data->icp_page_ptr)
- put_free_4k_page(data->icp_page_ptr);
comm_close(fd);
return 0;
}
entry = data->entry;
debug(10, 4, "gopherLifeTimeExpire: FD %d: <URL:%s>\n", fd, entry->url);
squid_error_entry(entry, ERR_LIFETIME_EXP, NULL);
- if (data->icp_page_ptr)
- put_free_4k_page(data->icp_page_ptr);
comm_set_select_handler(fd,
COMM_SELECT_READ | COMM_SELECT_WRITE,
0,
if (buf)
put_free_4k_page(buf); /* Allocated by gopherSendRequest. */
- gopherState->icp_page_ptr = NULL;
}
/* This will be called when connect completes. Write request. */
LOCAL_ARRAY(char, query, MAX_URL);
char *buf = get_free_4k_page();
- data->icp_page_ptr = buf;
-
if (data->type_id == GOPHER_CSO) {
sscanf(data->request, "?%s", query);
len = strlen(query) + 15;
len,
30,
gopherSendComplete,
- (void *) data);
+ (void *) data,
+ put_free_4k_page);
if (BIT_TEST(data->entry->flag, CACHABLE))
storeSetPublicKey(data->entry); /* Make it public */
}
/*
- * $Id: http.cc,v 1.63 1996/07/19 17:38:38 wessels Exp $
+ * $Id: http.cc,v 1.64 1996/07/20 03:16:51 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
put_free_8k_page(httpState->reply_hdr);
httpState->reply_hdr = NULL;
}
- if (httpState->reqbuf && httpState->buf_type == BUF_TYPE_8K) {
- put_free_8k_page(httpState->reqbuf);
- httpState->reqbuf = NULL;
- } else {
- safe_free(httpState->reqbuf)
- }
requestUnlink(httpState->request);
xfree(httpState);
return 0;
return;
}
errno = 0;
- IOStats.Http.reads++;
len = read(fd, buf, SQUID_TCP_SO_RCVBUF);
debug(11, 5, "httpReadReply: FD %d: len %d.\n", fd, len);
comm_set_fd_lifetime(fd, 86400); /* extend after good read */
if (len > 0) {
+ IOStats.Http.reads++;
for (clen = len - 1, bin = 0; clen; bin++)
clen >>= 1;
IOStats.Http.read_hist[bin]++;
debug(11, 5, "httpSendComplete: FD %d: size %d: errflag %d.\n",
fd, size, errflag);
- if (httpState->reqbuf && httpState->buf_type == BUF_TYPE_8K) {
- put_free_8k_page(httpState->reqbuf);
- httpState->reqbuf = NULL;
- } else {
- safe_free(httpState->reqbuf);
- }
-
if (errflag) {
squid_error_entry(entry, ERR_CONNECT_FAIL, xstrerror());
comm_close(fd);
int cfd = -1;
request_t *req = httpState->request;
char *Method = RequestMethodStr[req->method];
+ int buftype = 0;
debug(11, 5, "httpSendRequest: FD %d: httpState %p.\n", fd, httpState);
buflen = strlen(Method) + strlen(req->urlpath);
}
}
if (buflen < DISK_PAGE_SIZE) {
- httpState->reqbuf = get_free_8k_page();
- memset(httpState->reqbuf, '\0', buflen);
- httpState->buf_type = BUF_TYPE_8K;
+ buf = get_free_8k_page();
+ memset(buf, '\0', buflen);
+ buftype = BUF_TYPE_8K;
} else {
- httpState->reqbuf = xcalloc(buflen, 1);
- httpState->buf_type = BUF_TYPE_MALLOC;
+ buf = xcalloc(buflen, 1);
+ buftype = BUF_TYPE_MALLOC;
}
- buf = httpState->reqbuf;
sprintf(buf, "%s %s HTTP/1.0\r\n",
Method,
len,
30,
httpSendComplete,
- httpState);
+ httpState,
+ buftype == BUF_TYPE_8K ? put_free_8k_page : xfree);
}
static void httpConnInProgress(fd, httpState)
/*
- * $Id: ident.cc,v 1.5 1996/07/18 20:27:04 wessels Exp $
+ * $Id: ident.cc,v 1.6 1996/07/20 03:16:52 wessels Exp $
*
* DEBUG: section 31 Ident (RFC 931)
* AUTHOR: Duane Wessels
strlen(reqbuf),
5, /* timeout */
identRequestComplete,
- (void *) icpState);
+ (void *) icpState,
+ NULL);
comm_set_select_handler(sock,
COMM_SELECT_READ,
(PF) identReadReply,
/*
- * $Id: ipcache.cc,v 1.34 1996/07/19 17:34:45 wessels Exp $
+ * $Id: ipcache.cc,v 1.35 1996/07/20 03:16:53 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
strlen(buf),
0, /* timeout */
NULL, /* Handler */
- NULL); /* Handler-data */
+ NULL, /* Handler-data */
+ xfree);
debug(14, 5, "dnsDispatch: Request sent to DNS server #%d.\n",
dns->id);
dns->dispatch_time = current_time;
strlen(shutdown),
0, /* timeout */
NULL, /* Handler */
- NULL); /* Handler-data */
+ NULL, /* Handler-data */
+ xfree);
dnsData->flags |= DNS_FLAG_CLOSING;
}
}
/*
- * $Id: neighbors.cc,v 1.32 1996/07/19 17:35:23 wessels Exp $
+ * $Id: neighbors.cc,v 1.33 1996/07/20 03:16:53 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
code = HIER_MAX;
if (mem)
mem->hierarchy_code = code;
+ if (mem && cache_host)
+ mem->hierarchy_host = xstrdup(cache_host);
if (emulate_httpd_log) {
if (squid_curtime != last_time) {
/*
- * $Id: redirect.cc,v 1.5 1996/07/18 20:27:07 wessels Exp $
+ * $Id: redirect.cc,v 1.6 1996/07/20 03:16:54 wessels Exp $
*
* DEBUG: section 29 Redirector
* AUTHOR: Duane Wessels
len,
0, /* timeout */
NULL, /* Handler */
- NULL); /* Handler-data */
+ NULL, /* Handler-data */
+ xfree);
debug(29, 5, "redirectDispatch: Request sent to Redirector #%d, %d bytes\n",
redirect->index + 1, len);
RedirectStats.use_hist[redirect->index]++;
/*
- * $Id: squid.h,v 1.29 1996/07/19 17:38:38 wessels Exp $
+ * $Id: squid.h,v 1.30 1996/07/20 03:16:54 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#endif
#define NUM32LEN sizeof(num32) /* this should always be 4 */
-#if MALLOC_GUARD
+#if PURIFY
#define LOCAL_ARRAY(type,name,size) \
static type *local_##name=NULL; \
type *name = local_##name ? local_##name : \
/*
- * $Id: ssl.cc,v 1.6 1996/07/18 20:27:09 wessels Exp $
+ * $Id: ssl.cc,v 1.7 1996/07/20 03:16:55 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
strlen(buf),
30,
sslErrorComplete,
- sslState);
+ sslState,
+ xfree);
return;
}
}
strlen(buf),
30,
sslErrorComplete,
- (void *) sslState);
+ (void *) sslState,
+ xfree);
return COMM_ERROR;
}
debug(26, 5, "sslConnect: client=%d server=%d\n",
strlen(buf),
30,
sslErrorComplete,
- (void *) sslState);
+ (void *) sslState,
+ xfree);
return COMM_ERROR;
} else {
debug(26, 5, "sslConnect: conn %d EINPROGRESS\n", fd);
strlen(buf),
30,
sslErrorComplete,
- (void *) sslState);
+ (void *) sslState,
+ xfree);
return COMM_ERROR;
}
sslState = xcalloc(1, sizeof(SslStateData));
/*
- * $Id: stat.cc,v 1.42 1996/07/18 20:27:10 wessels Exp $
+ * $Id: stat.cc,v 1.43 1996/07/20 03:16:55 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
}
-void log_append(obj, url, id, size, action, method, http_code, msec, ident, hier)
+void log_append(obj, url, id, size, action, method, http_code, msec, ident, hier, neighbor)
cacheinfo *obj;
char *url;
char *id;
int msec;
char *ident;
hier_code hier;
+ char *neighbor;
{
LOCAL_ARRAY(char, tmp, 6000); /* MAX_URL is 4096 */
- char *buf = NULL;
int x;
+ static char *dash = "-";
getCurrentTime();
#endif
if (!method)
- method = "-";
+ method = dash;
if (!url)
- url = "-";
+ url = dash;
if (!ident || ident[0] == '\0')
- ident = "-";
+ ident = dash;
+ if (!neighbor)
+ neighbor = dash;
if (obj->logfile_status == LOG_ENABLE) {
if (emulate_httpd_log)
action,
size);
else
- sprintf(tmp, "%9d.%03d %6d %s %s/%03d/%s %d %s %s %s\n",
+ sprintf(tmp, "%9d.%03d %6d %s %s/%03d %d %s %s %s %s/%s\n",
(int) current_time.tv_sec,
(int) current_time.tv_usec / 1000,
msec,
id,
action,
http_code,
- hier_strings[hier],
size,
method,
url,
- ident);
+ ident,
+ hier_strings[hier],
+ neighbor);
x = file_write(obj->logfile_fd,
- buf = xstrdup(tmp),
+ xstrdup(tmp),
strlen(tmp),
obj->logfile_access,
NULL,
NULL,
xfree);
- if (x != DISK_OK) {
+ if (x != DISK_OK)
debug(18, 1, "log_append: File write failed.\n");
- safe_free(buf);
- }
}
}
/*
- * $Id: stmem.cc,v 1.13 1996/07/17 17:03:45 wessels Exp $
+ * $Id: stmem.cc,v 1.14 1996/07/20 03:16:56 wessels Exp $
*
* DEBUG: section 19 Memory Primitives
* AUTHOR: Harvest Derived
mem_obj_pool.n_pages_in_use = 0;
mem_obj_pool.max_pages = FD_SETSIZE >> 3;
+#if PURIFY
+ sm_stats.max_pages = 0;
+ disk_stats.max_pages = 0;
+ request_pool.max_pages = 0;
+ mem_obj_pool.max_pages = 0;
+#endif
+
init_stack(&sm_stats.free_page_stack, sm_stats.max_pages);
init_stack(&disk_stats.free_page_stack, disk_stats.max_pages);
init_stack(&request_pool.free_page_stack, request_pool.max_pages);
/*
- * $Id: store.cc,v 1.72 1996/07/19 17:41:30 wessels Exp $
+ * $Id: store.cc,v 1.73 1996/07/20 03:16:57 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
safe_free(mem->mime_hdr);
safe_free(mem->reply);
safe_free(mem->e_abort_msg);
+ safe_free(mem->hierarchy_host);
requestUnlink(mem->request);
mem->request = NULL;
put_free_mem_obj(mem);
&scan3, /* last modified */
&scan4, /* size */
url); /* url */
- debug(20, 9, "x = %d\n", x);
if (x > 0)
storeSwapFullPath(sfileno, swapfile);
if (x != 6) {
/*
- * $Id: tunnel.cc,v 1.6 1996/07/18 20:27:09 wessels Exp $
+ * $Id: tunnel.cc,v 1.7 1996/07/20 03:16:55 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
strlen(buf),
30,
sslErrorComplete,
- sslState);
+ sslState,
+ xfree);
return;
}
}
strlen(buf),
30,
sslErrorComplete,
- (void *) sslState);
+ (void *) sslState,
+ xfree);
return COMM_ERROR;
}
debug(26, 5, "sslConnect: client=%d server=%d\n",
strlen(buf),
30,
sslErrorComplete,
- (void *) sslState);
+ (void *) sslState,
+ xfree);
return COMM_ERROR;
} else {
debug(26, 5, "sslConnect: conn %d EINPROGRESS\n", fd);
strlen(buf),
30,
sslErrorComplete,
- (void *) sslState);
+ (void *) sslState,
+ xfree);
return COMM_ERROR;
}
sslState = xcalloc(1, sizeof(SslStateData));
/*
- * $Id: wais.cc,v 1.33 1996/07/18 20:27:13 wessels Exp $
+ * $Id: wais.cc,v 1.34 1996/07/20 03:16:58 wessels Exp $
*
* DEBUG: section 24 WAIS Relay
* AUTHOR: Harvest Derived
(void *) waisState,
getReadTimeout());
}
- safe_free(buf); /* Allocated by waisSendRequest. */
}
/* This will be called when connect completes. Write request. */
len,
30,
waisSendComplete,
- (void *) waisState);
+ (void *) waisState,
+ xfree);
if (BIT_TEST(waisState->entry->flag, CACHABLE))
storeSetPublicKey(waisState->entry); /* Make it public */
}