/[svn]/ircd-hybrid/libio/comm/devpoll.c
ViewVC logotype

Diff of /ircd-hybrid/libio/comm/devpoll.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 280 by adx, Thu Nov 3 15:42:51 2005 UTC revision 281 by adx, Thu Nov 24 10:29:09 2005 UTC
# Line 105  comm_setselect(fde_t *F, unsigned int ty Line 105  comm_setselect(fde_t *F, unsigned int ty
105      F->write_data = client_data;      F->write_data = client_data;
106    }    }
107    
108    new_events = (F->read_handler ? POLLRDNORM : 0) |    new_events = (F->read_handler ? POLLIN : 0) |
109      (F->write_handler ? POLLWRNORM : 0);      (F->write_handler ? POLLOUT : 0);
110    
111    if (timeout != 0)    if (timeout != 0)
112      F->timeout = CurrentTime + (timeout / 1000);      F->timeout = CurrentTime + (timeout / 1000);
# Line 157  comm_select(void) Line 157  comm_select(void)
157      if (F == NULL || !F->flags.open)      if (F == NULL || !F->flags.open)
158        continue;        continue;
159    
160      if ((dopoll.dp_fds[i].revents & (POLLRDNORM | POLLIN | POLLHUP | POLLERR)))      if ((dopoll.dp_fds[i].revents & POLLIN))
161        if ((hdl = F->read_handler) != NULL)        if ((hdl = F->read_handler) != NULL)
162        {        {
163          F->read_handler = NULL;          F->read_handler = NULL;
# Line 166  comm_select(void) Line 166  comm_select(void)
166            continue;            continue;
167        }        }
168    
169      if ((dopoll.dp_fds[i].revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)))      if ((dopoll.dp_fds[i].revents & POLLOUT))
170        if ((hdl = F->write_handler) != NULL)        if ((hdl = F->write_handler) != NULL)
171        {        {
172          F->write_handler = NULL;          F->write_handler = NULL;

Legend:
Removed from v.280  
changed lines
  Added in v.281

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28