-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.119 2012/10/23 10:17:36 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.120 2013/01/01 22:11:08 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
continue;
}
+#ifndef _WIN32
+ if (fd >= FD_SETSIZE)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Server socket number too high to use select(): %d >= %d",
+ fd, FD_SETSIZE);
+ close_socket(fd);
+ return JB_INVALID_SOCKET;
+ }
+#endif
+
#ifdef TCP_NODELAY
{ /* turn off TCP coalescence */
int mi = 1;
return(JB_INVALID_SOCKET);
}
+#ifndef _WIN32
+ if (fd >= FD_SETSIZE)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Server socket number too high to use select(): %d >= %d",
+ fd, FD_SETSIZE);
+ close_socket(fd);
+ return JB_INVALID_SOCKET;
+ }
+#endif
+
#ifdef TCP_NODELAY
{ /* turn off TCP coalescence */
int mi = 1;
}
#endif
+#ifndef _WIN32
+ if (afd >= FD_SETSIZE)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "Client socket number too high to use select(): %d >= %d",
+ afd, FD_SETSIZE);
+ close_socket(afd);
+ return 0;
+ }
+#endif
+
csp->cfd = afd;
#ifdef HAVE_RFC2553
csp->ip_addr_str = malloc(NI_MAXHOST);
-const char jcc_rcs[] = "$Id: jcc.c,v 1.421 2012/12/07 12:50:37 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.423 2013/01/03 15:25:08 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
return JB_INVALID_SOCKET;
}
+#ifndef _WIN32
+ if (bfd >= FD_SETSIZE)
+ {
+ log_error(LOG_LEVEL_FATAL,
+ "Bind socket number too high to use select(): %d >= %d",
+ bfd, FD_SETSIZE);
+ }
+#endif
+
if (haddr == NULL)
{
log_error(LOG_LEVEL_INFO, "Listening on port %d on all IP addresses",