]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - libcharybdis/select.c
Prevent cork usage as charybdis doesn't have its support
[irc/rqf/shadowircd.git] / libcharybdis / select.c
index 5108915eab4a0ba15b7b9c80e6b8b1b31b8f31c3..d019203ca3fc3462a9dba6cad8e90931937dda9c 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: select.c 3229 2007-03-05 17:23:07Z nenolod $
+ *  $Id: select.c 3528 2007-07-07 08:08:23Z nenolod $
  */
 
 #include "config.h"
 
 #include "libcharybdis.h"
 
-#if HARD_FDLIMIT_ >= FD_SETSIZE
-#error HARD_FDLIMIT_ must be less than FD_SETSIZE(try using poll instead of select)
-#endif
 /*
  * Note that this is only a single list - multiple lists is kinda pointless
  * under select because the list size is a function of the highest FD :-)
@@ -107,7 +104,9 @@ comm_setselect(int fd, fdlist_t list, unsigned int type, PF * handler,
 {
        fde_t *F = comm_locate_fd(fd);
        s_assert(fd >= 0);
-       s_assert(F->flags.open);
+
+       if (!F)
+               F = comm_add_fd(fd);
 
        if(type & COMM_SELECT_READ)
        {