[dovecot-cvs] dovecot/src/lib ioloop-poll.c,1.12,1.13
cras at procontrol.fi
cras at procontrol.fi
Fri May 23 17:54:53 EEST 2003
Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv21576
Modified Files:
ioloop-poll.c
Log Message:
Clear old poll revents when removing the IO. Just extra sanity check.
Index: ioloop-poll.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop-poll.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ioloop-poll.c 27 Apr 2003 02:51:34 -0000 1.12
+++ ioloop-poll.c 23 May 2003 13:54:51 -0000 1.13
@@ -123,10 +123,14 @@
index = data->fd_index[fd];
i_assert(index >= 0 && (unsigned int) index < data->fds_size);
- if (condition & IO_READ)
+ if (condition & IO_READ) {
data->fds[index].events &= ~(POLLIN|POLLPRI);
- if (condition & IO_WRITE)
+ data->fds[index].revents &= ~(POLLIN|POLLPRI);
+ }
+ if (condition & IO_WRITE) {
data->fds[index].events &= ~POLLOUT;
+ data->fds[index].revents &= ~POLLOUT;
+ }
if ((data->fds[index].events & (POLLIN|POLLOUT)) == 0) {
/* remove the whole pollfd */
More information about the dovecot-cvs
mailing list