- If Conf_MaxConnections is "ulimited" (<1) it is limited to FD_SETSIZE.
authorAlexander Barton <alex@barton.de>
Wed, 18 Dec 2002 02:52:51 +0000 (02:52 +0000)
committerAlexander Barton <alex@barton.de>
Wed, 18 Dec 2002 02:52:51 +0000 (02:52 +0000)
src/ngircd/conf.c

index d0f33934c8ea8b0f52337d226c7f453f3f60d59c..942dbe212cb6c99d291fb3bacb40dfaecb8c8034 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conf.c,v 1.45 2002/12/18 02:47:12 alex Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.46 2002/12/18 02:52:51 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -664,7 +664,7 @@ Validate_Config( BOOLEAN Configtest )
                Config_Error( LOG_WARNING, "No administrative information configured but required by RFC!" );
        }
 #ifdef FD_SETSIZE      
-       if( Conf_MaxConnections > (LONG)FD_SETSIZE )
+       if(( Conf_MaxConnections > (LONG)FD_SETSIZE ) || ( Conf_MaxConnections < 1 ))
        {
                Conf_MaxConnections = (LONG)FD_SETSIZE;
                Config_Error( LOG_ERR, "Setting MaxConnections to %ld, select() can't handle more file descriptors!", Conf_MaxConnections );