/*
- * $Id: comm.cc,v 1.339 2002/10/15 00:59:49 adrian Exp $
+ * $Id: comm.cc,v 1.340 2002/10/16 15:03:12 adrian Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
commSetTimeout(fd, -1, NULL, NULL);
CommWriteStateCallbackAndFree(fd, COMM_ERR_CLOSING);
- /* Schedule immediate callbacks for the read/accept/fill routines, if any */
+ /* Do callbacks for read/accept/fill routines, if any */
if (fdc_table[fd].read.handler) {
- comm_addreadcallback(fd, fdc_table[fd].read.handler, fdc_table[fd].read.buf,
- 0, COMM_ERR_CLOSING, 0, fdc_table[fd].read.handler_data);
+ fdc_table[fd].read.handler(fd, fdc_table[fd].read.buf, 0,
+ COMM_ERR_CLOSING, 0, fdc_table[fd].read.handler_data);
fdc_table[fd].read.handler = NULL;
}
if (fdc_table[fd].accept.handler) {
- comm_addacceptcallback(fd, -1, fdc_table[fd].accept.handler, NULL, NULL,
- COMM_ERR_CLOSING, 0, fdc_table[fd].accept.handler_data);
+ fdc_table[fd].accept.handler(fd, -1, NULL, NULL, COMM_ERR_CLOSING,
+ 0, fdc_table[fd].accept.handler_data);
fdc_table[fd].accept.handler = NULL;
}
if (fdc_table[fd].fill.handler) {
- comm_add_fill_callback(fd, 0, COMM_ERR_CLOSING, 0);
+ fdc_table[fd].fill.handler(fd, fdc_table[fd].fill.requestedData, COMM_ERR_CLOSING, 0,
+ fdc_table[fd].fill.handler_data);
fdc_table[fd].fill.handler = NULL;
}
/* Complete (w/ COMM_ERR_CLOSING!) any pending io callbacks */