From 204337f905aabfdc18467dba3987c0a8425d66f3 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 27 Apr 2011 18:11:05 +0000 Subject: [PATCH] In connect_to(), do not pretent to retry if forwarded-connect-retries is zero or unset. --- jbsockets.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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); -- 2.39.2