X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jcc.c;h=b1d275c3a1c473d75fe876033f323c7155b3c3cf;hb=3745c566a0be9e2e7efcc7ec4e2db16e66a840fb;hp=2a8b02cf871f63c9016627dd8153f343febe8eb1;hpb=30defd42c45101d6bb8592862cebc30891321fed;p=privoxy.git diff --git a/jcc.c b/jcc.c index 2a8b02cf..b1d275c3 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.420 2012/12/07 12:45:20 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.424 2013/03/01 17:38:34 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -3643,7 +3643,7 @@ int main(int argc, char **argv) * on failure. * * Parameters : - * 1 : haddr = Host addres to bind to. Use NULL to bind to + * 1 : haddr = Host address to bind to. Use NULL to bind to * INADDR_ANY. * 2 : hport = Specifies port to bind to. * @@ -3682,6 +3682,15 @@ static jb_socket bind_port_helper(const char *haddr, int hport) 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",