Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv9808/src
Modified Files:
ioset.c
Log Message:
Make sure ioset clients receive EOF notifications by invoking the readable callback.
Index: ioset.c
===================================================================
RCS file: /cvsroot/srvx/services/src/ioset.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** ioset.c 11 Oct 2002 03:11:35 -0000 1.10
--- ioset.c 16 Oct 2002 03:35:21 -0000 1.11
***************
*** 244,253 ****
default:
log(MAIN_LOG, LOG_ERROR, "Unexpected read() error %d on fd %d: %s\n", errno, fd->fd, strerror(errno));
! fd->eof = 1; /* just flag it as EOF; the next ioset_line_read() will find it */
fd->wants_reads = 0;
}
} else if (nbr == 0) {
fd->eof = 1;
fd->wants_reads = 0;
} else {
if (fd->line_len == 0) {
--- 244,257 ----
default:
log(MAIN_LOG, LOG_ERROR, "Unexpected read() error %d on fd %d: %s\n", errno, fd->fd, strerror(errno));
! /* Just flag it as EOF and call ioset_line_read() to notify
! the fd's owner. */
! fd->eof = 1;
fd->wants_reads = 0;
+ fd->readable_cb(fd);
}
} else if (nbr == 0) {
fd->eof = 1;
fd->wants_reads = 0;
+ fd->readable_cb(fd);
} else {
if (fd->line_len == 0) {
|