epoll_ctl (epoll_fd, mode, fd, &ev);
}
epoll_ctl (epoll_fd, mode, fd, &ev);
}
- if (anfds [fd].wev)
- epoll_modify (fd, EV_NONE, anfds [fd].wev);
+ if (anfds [fd].events)//D
+ epoll_modify (fd, EV_NONE, anfds [fd].events);
{
int eventcnt = epoll_wait (epoll_fd, events, eventmax, ceil (timeout * 1000.));
int i;
{
int eventcnt = epoll_wait (epoll_fd, events, eventmax, ceil (timeout * 1000.));
int i;
(events [i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0)
| (events [i].events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0)
);
/* if the receive array was full, increase its size */
(events [i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0)
| (events [i].events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0)
);
/* if the receive array was full, increase its size */
eventmax = 64; /* intiial number of events receivable per poll */
events = malloc (sizeof (struct epoll_event) * eventmax);
}
eventmax = 64; /* intiial number of events receivable per poll */
events = malloc (sizeof (struct epoll_event) * eventmax);
}