From: Fabian Keil Date: Wed, 27 Apr 2011 18:11:05 +0000 (+0000) Subject: In connect_to(), do not pretent to retry if forwarded-connect-retries is zero or... X-Git-Tag: v_3_0_18~248 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=204337f905aabfdc18467dba3987c0a8425d66f3 In connect_to(), do not pretent to retry if forwarded-connect-retries is zero or unset. --- diff --git a/jbsockets.c b/jbsockets.c index 680d0830..ae9e6bc2 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.98 2011/03/27 14:08:35 fabiankeil Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.99 2011/04/19 13:00:47 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -163,9 +163,12 @@ jb_socket connect_to(const char *host, int portnum, struct client_state *csp) break; } forwarded_connect_retries++; - log_error(LOG_LEVEL_ERROR, - "Attempt %d of %d to connect to %s failed. Trying again.", - forwarded_connect_retries, csp->config->forwarded_connect_retries, host); + if (csp->config->forwarded_connect_retries != 0) + { + log_error(LOG_LEVEL_ERROR, + "Attempt %d of %d to connect to %s failed. Trying again.", + forwarded_connect_retries, csp->config->forwarded_connect_retries, host); + } } while (forwarded_connect_retries < csp->config->forwarded_connect_retries);