struct main_file *fi;
while (fi = clist_head(&m->file_active_list))
{
- if (fi->write_handler && (fi->events & (POLLOUT | POLLHUP | POLLERR)))
- {
- fi->events &= ~(POLLOUT | POLLHUP | POLLERR);
- do
- DBG("MAIN: Write event on fd %d", fi->fd);
- while (fi->write_handler && fi->write_handler(fi));
- continue;
- }
if (fi->read_handler && (fi->events & (POLLIN | POLLHUP)))
{
fi->events &= ~(POLLIN | POLLHUP);
while (fi->read_handler && fi->read_handler(fi));
continue;
}
+ if (fi->write_handler && (fi->events & (POLLOUT | POLLHUP | POLLERR)))
+ {
+ fi->events &= ~(POLLOUT | POLLHUP | POLLERR);
+ do
+ DBG("MAIN: Write event on fd %d", fi->fd);
+ while (fi->write_handler && fi->write_handler(fi));
+ continue;
+ }
clist_remove(&fi->n);
clist_add_tail(&m->file_list, &fi->n);
}