]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - libcharybdis/epoll.c
[svn] Merge old trunk r2065,r2067:
[irc/rqf/shadowircd.git] / libcharybdis / epoll.c
index 45335f8dd8ffbc4fd7ea131b0601c8b0a26da947..30565a200ca8b59f29bffc546b4b53e254f1f72f 100644 (file)
@@ -23,7 +23,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: epoll.c 3229 2007-03-05 17:23:07Z nenolod $
+ *  $Id: epoll.c 3374 2007-04-03 10:49:11Z nenolod $
  */
 
 #include "config.h"
@@ -112,9 +112,7 @@ comm_setselect(int fd, fdlist_t list, unsigned int type, PF * handler,
        if(timeout)
                F->timeout = CurrentTime + (timeout / 1000);
 
-       if(old_flags == 0 && F->pflags == 0)
-               return;
-       else if(F->pflags <= 0)
+       if(!(F->pflags & EPOLLIN) && !(F->pflags & EPOLLOUT))
                op = EPOLL_CTL_DEL;
        else if(old_flags == 0 && F->pflags > 0)
                op = EPOLL_CTL_ADD;
@@ -133,8 +131,6 @@ comm_setselect(int fd, fdlist_t list, unsigned int type, PF * handler,
                libcharybdis_log("comm_setselect(): epoll_ctl failed: %s", strerror(errno));
                abort();
        }
-
-
 }
 
 /*