c2a7c47a09
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@1661 6952d904-891a-0410-993b-d76249ca496b
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
Index: scheduler/select.c
|
|
===================================================================
|
|
--- scheduler/select.c (revision 8887)
|
|
+++ scheduler/select.c (working copy)
|
|
@@ -454,7 +454,7 @@
|
|
if (fdptr->read_cb && event->filter == EVFILT_READ)
|
|
(*(fdptr->read_cb))(fdptr->data);
|
|
|
|
- if (fdptr->write_cb && event->filter == EVFILT_WRITE)
|
|
+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE)
|
|
(*(fdptr->write_cb))(fdptr->data);
|
|
|
|
release_fd(fdptr);
|
|
@@ -499,7 +499,8 @@
|
|
if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP)))
|
|
(*(fdptr->read_cb))(fdptr->data);
|
|
|
|
- if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
|
|
+ if (fdptr->use > 1 && fdptr->write_cb &&
|
|
+ (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
|
|
(*(fdptr->write_cb))(fdptr->data);
|
|
|
|
release_fd(fdptr);
|
|
@@ -590,7 +591,8 @@
|
|
if (fdptr->read_cb && (pfd->revents & (POLLIN | POLLERR | POLLHUP)))
|
|
(*(fdptr->read_cb))(fdptr->data);
|
|
|
|
- if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
|
|
+ if (fdptr->use > 1 && fdptr->write_cb &&
|
|
+ (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
|
|
(*(fdptr->write_cb))(fdptr->data);
|
|
|
|
release_fd(fdptr);
|
|
@@ -645,7 +647,8 @@
|
|
if (fdptr->read_cb && FD_ISSET(fdptr->fd, &cupsd_current_input))
|
|
(*(fdptr->read_cb))(fdptr->data);
|
|
|
|
- if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output))
|
|
+ if (fdptr->use > 1 && fdptr->write_cb &&
|
|
+ FD_ISSET(fdptr->fd, &cupsd_current_output))
|
|
(*(fdptr->write_cb))(fdptr->data);
|
|
|
|
release_fd(fdptr);
|