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 1028 by michael, Sun Nov 8 13:03:38 2009 UTC vs.
ircd-hybrid/trunk/src/s_bsd_devpoll.c (file contents), Revision 2650 by michael, Tue Dec 10 19:46:48 2013 UTC

# Line 39 | Line 39
39   #include "fdlist.h"
40   #include "ircd.h"
41   #include "s_bsd.h"
42 < #include "s_log.h"
42 > #include "log.h"
43  
44   static fde_t dpfd;
45  
# Line 56 | Line 56 | init_netio(void)
56  
57    if ((fd = open("/dev/poll", O_RDWR)) < 0)
58    {
59 <    ilog(L_CRIT, "init_netio: Couldn't open /dev/poll - %d: %s",
59 >    ilog(LOG_TYPE_IRCD, "init_netio: Couldn't open /dev/poll - %d: %s",
60           errno, strerror(errno));
61      exit(115); /* Whee! */
62    }
# Line 82 | Line 82 | devpoll_write_update(int fd, int events)
82  
83    /* Write the thing to our poll fd */
84    if (write(dpfd.fd, &pfd, sizeof(pfd)) != sizeof(pfd))
85 <    ilog(L_NOTICE, "devpoll_write_update: dpfd write failed %d: %s",
85 >    ilog(LOG_TYPE_IRCD, "devpoll_write_update: dpfd write failed %d: %s",
86           errno, strerror(errno));
87   }
88  
# Line 163 | Line 163 | comm_select(void)
163        continue;
164  
165      if ((dopoll.dp_fds[i].revents & POLLIN))
166 +    {
167        if ((hdl = F->read_handler) != NULL)
168        {
169          F->read_handler = NULL;
# Line 170 | Line 171 | comm_select(void)
171          if (!F->flags.open)
172            continue;
173        }
174 +    }
175  
176      if ((dopoll.dp_fds[i].revents & POLLOUT))
177 +    {
178        if ((hdl = F->write_handler) != NULL)
179        {
180          F->write_handler = NULL;
# Line 179 | Line 182 | comm_select(void)
182          if (!F->flags.open)
183            continue;
184        }
185 +    }
186  
187      comm_setselect(F, 0, NULL, NULL, 0);
188    }

Diff Legend

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