]> git.sesse.net Git - vlc/commitdiff
Reallow file descriptor above FD_SETSIZE since we now use poll()
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 8 Sep 2006 17:53:14 +0000 (17:53 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 8 Sep 2006 17:53:14 +0000 (17:53 +0000)
src/network/io.c
src/network/tcp.c

index c4ea66027c0630977ba8383432ae110901223047..1f072f58186ea75fe959a7e304774dc4909210cb 100644 (file)
@@ -79,14 +79,6 @@ int net_Socket( vlc_object_t *p_this, int i_family, int i_socktype,
             msg_Err( p_this, "cannot set socket to non-blocking mode" );
     }
 #else
-    if( fd >= FD_SETSIZE )
-    {
-        /* We don't want to overflow select() fd_set */
-        msg_Err( p_this, "cannot create socket (too many already in use)" );
-        net_Close( fd );
-        return -1;
-    }
-
     fcntl( fd, F_SETFD, FD_CLOEXEC );
     i_val = fcntl( fd, F_GETFL, 0 );
     fcntl( fd, F_SETFL, ((i_val != -1) ? i_val : 0) | O_NONBLOCK );
index 67fc08aa8bacabcf1ba172cab1fbce65d7dd535a..9c7edb74ead3c105d32118437a423713659920ee 100644 (file)
@@ -416,13 +416,6 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait )
             if( i_val < 0 )
                 msg_Err( p_this, "accept failed (%s)",
                          net_strerror( net_errno ) );
-#ifndef WIN32
-            else if( i_val >= FD_SETSIZE )
-            {
-                net_Close( i_val ); /* avoid future overflows in FD_SET */
-                msg_Err( p_this, "accept failed (too many sockets opened)" );
-            }
-#endif
             else
             {
                 const int yes = 1;