X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/e70f8e928edac3d89ea526a549f97860652c263e..a83914b3fcbc15cb24156f875781b8c114db5503:/libcharybdis/select.c diff --git a/libcharybdis/select.c b/libcharybdis/select.c index 5108915..d019203 100644 --- a/libcharybdis/select.c +++ b/libcharybdis/select.c @@ -22,16 +22,13 @@ * 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) {