]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - libcharybdis/poll.c
[svn] - use a hashtable for fdlist storage. first step to making the amount of allowe...
[irc/rqf/shadowircd.git] / libcharybdis / poll.c
index 5929b713bb465aa4caa0a89c56a7824235ca18ea..bf82476a23b392abdccc316aee4eecc89128bd85 100644 (file)
@@ -22,7 +22,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: poll.c 390 2005-12-07 18:46:56Z nenolod $
+ *  $Id: poll.c 3229 2007-03-05 17:23:07Z nenolod $
  */
 
 #include "config.h"
@@ -81,7 +81,7 @@ poll_findslot(void)
 static void
 poll_update_pollfds(int fd, short event, PF * handler)
 {
-       fde_t *F = &fd_table[fd];
+       fde_t *F = comm_locate_table(fd);
        int comm_index;
 
        if(F->comm_index < 0)
@@ -155,7 +155,7 @@ void
 comm_setselect(int fd, fdlist_t list, unsigned int type, PF * handler,
               void *client_data, time_t timeout)
 {
-       fde_t *F = &fd_table[fd];
+       fde_t *F = comm_locate_fd(fd);
        s_assert(fd >= 0);
        s_assert(F->flags.open);
 
@@ -255,7 +255,7 @@ comm_select(unsigned long delay)
                   (pollfd_list.pollfds[ci].fd) == -1)
                        continue;
                fd = pollfd_list.pollfds[ci].fd;
-               F = &fd_table[fd];
+               F = comm_locate_fd(fd);
                if(revents & (POLLRDNORM | POLLIN | POLLHUP | POLLERR))
                {
                        hdl = F->read_handler;