/*
- * $Id: client_side.cc,v 1.642 2003/06/23 08:38:39 hno Exp $
+ * $Id: client_side.cc,v 1.643 2003/06/23 14:13:03 robertc Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
ConnStateData *conn = data;
debug(33, 3) ("requestTimeout: FD %d: lifetime is expired.\n", fd);
- if (fd_table[fd].rwstate) {
+ if (fd_table[fd].wstate) {
+ /* FIXME: If this code is reinstated, check the conn counters,
+ * not the fd table state
+ */
/*
* Some data has been sent to the client, just close the FD
*/
/*
- * $Id: comm.cc,v 1.377 2003/06/23 12:27:12 robertc Exp $
+ * $Id: comm.cc,v 1.378 2003/06/23 14:13:03 robertc Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
static void
CommWriteStateCallbackAndFree(int fd, comm_err_t code)
{
- CommWriteStateData *CommWriteState = fd_table[fd].rwstate;
+ CommWriteStateData *CommWriteState = fd_table[fd].wstate;
CWCB *callback = NULL;
void *cbdata;
- fd_table[fd].rwstate = NULL;
+ fd_table[fd].wstate = NULL;
if (CommWriteState == NULL)
return;
PROF_stop(commHandleWrite);
}
-
-
/*
* Queue a write. handler/handler_data are called when the write
* completes, on error, or on file descriptor close.
*/
void
comm_old_write(int fd, const char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) {
- CommWriteStateData *state = fd_table[fd].rwstate;
+ CommWriteStateData *state = fd_table[fd].wstate;
assert(!fd_table[fd].flags.closing);
fd, size, handler, handler_data);
if (NULL != state) {
- debug(5, 1) ("comm_write: fd_table[%d].rwstate != NULL\n", fd);
+ /* This means that the write has been scheduled, but has not
+ * triggered yet
+ */
+ fatalf ("comm_write: fd_table[%d].wstate != NULL\n", fd);
memPoolFree(comm_write_pool, state);
- fd_table[fd].rwstate = NULL;
+ fd_table[fd].wstate = NULL;
}
- fd_table[fd].rwstate = state = (CommWriteStateData *)memPoolAlloc(comm_write_pool);
+ fd_table[fd].wstate = state = (CommWriteStateData *)memPoolAlloc(comm_write_pool);
state->buf = (char *) buf;
state->size = size;
state->offset = 0;
/*
- * $Id: fde.h,v 1.3 2003/03/04 01:40:27 robertc Exp $
+ * $Id: fde.h,v 1.4 2003/06/23 14:13:03 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
void *timeout_data;
void *lifetime_data;
close_handler *closeHandler; /* linked list */
- CommWriteStateData *rwstate; /* State data for comm_write */
+ CommWriteStateData *wstate; /* State data for comm_write */
READ_HANDLER *read_method;
WRITE_HANDLER *write_method;
#if USE_SSL