ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/s_bsd_devpoll.c
(Generate patch)

Comparing:
ircd-hybrid/src/s_bsd_devpoll.c (file contents), Revision 33 by knight, Sun Oct 2 20:50:00 2005 UTC vs.
ircd-hybrid-7.3/src/s_bsd_devpoll.c (file contents), Revision 1029 by michael, Sun Nov 8 13:10:50 2009 UTC

# Line 24 | Line 24
24   */
25  
26   #include "stdinc.h"
27 + #if USE_IOPOLL_MECHANISM == __IOPOLL_MECHANISM_DEVPOLL
28   #include <sys/ioctl.h>
29   /* HPUX uses devpoll.h and not sys/devpoll.h */
30   #ifdef HAVE_DEVPOLL_H
# Line 109 | Line 110 | comm_setselect(fde_t *F, unsigned int ty
110      F->write_data = client_data;
111    }
112  
113 <  new_events = (F->read_handler ? POLLRDNORM : 0) |
114 <    (F->write_handler ? POLLWRNORM : 0);
113 >  new_events = (F->read_handler ? POLLIN : 0) |
114 >    (F->write_handler ? POLLOUT : 0);
115  
116    if (timeout != 0)
117      F->timeout = CurrentTime + (timeout / 1000);
# Line 161 | Line 162 | comm_select(void)
162      if (F == NULL || !F->flags.open)
163        continue;
164  
165 <    if ((dopoll.dp_fds[i].revents & (POLLRDNORM | POLLIN | POLLHUP | POLLERR)))
165 >    if ((dopoll.dp_fds[i].revents & POLLIN))
166        if ((hdl = F->read_handler) != NULL)
167        {
168          F->read_handler = NULL;
169          hdl(F, F->read_data);
170 <        if (!F->flags.open)
171 <          continue;
170 >        if (!F->flags.open)
171 >          continue;
172        }
173  
174 <    if ((dopoll.dp_fds[i].revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)))
174 >    if ((dopoll.dp_fds[i].revents & POLLOUT))
175        if ((hdl = F->write_handler) != NULL)
176        {
177          F->write_handler = NULL;
178          hdl(F, F->write_data);
179 <        if (!F->flags.open)
180 <          continue;
179 >        if (!F->flags.open)
180 >          continue;
181        }
182  
183      comm_setselect(F, 0, NULL, NULL, 0);
184    }
185   }
186 + #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)