From: Fabian Keil Date: Sun, 17 Jul 2011 13:36:06 +0000 (+0000) Subject: Restructure bind_ports_helper() a bit X-Git-Tag: v_3_0_18~165 X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/@user-manual@?a=commitdiff_plain;h=e7276584f5c1786b670be685d6b76c996283be2d;p=privoxy.git Restructure bind_ports_helper() a bit Setting config->need_bind isn't necessary. --- diff --git a/jcc.c b/jcc.c index 306183ae..f6b284b8 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.358 2011/07/17 13:34:36 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.359 2011/07/17 13:35:32 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -3403,21 +3403,18 @@ static void bind_ports_helper(struct configuration_spec * config, { int i; - config->need_bind = 1; - for (i = 0; i < MAX_LISTENING_SOCKETS; i++) { - sockets[i] = JB_INVALID_SOCKET; - if (config->hport[i]) { sockets[i] = bind_port_helper(config->haddr[i], config->hport[i]); - if (JB_INVALID_SOCKET != sockets[i]) - { - config->need_bind = 0; - } + } + else + { + sockets[i] = JB_INVALID_SOCKET; } } + config->need_bind = 0; }