In connect_to(), do not pretent to retry if forwarded-connect-retries is zero or...
authorFabian Keil <fk@fabiankeil.de>
Wed, 27 Apr 2011 18:11:05 +0000 (18:11 +0000)
committerFabian Keil <fk@fabiankeil.de>
Wed, 27 Apr 2011 18:11:05 +0000 (18:11 +0000)
jbsockets.c

index 680d083..ae9e6bc 100644 (file)
@@ -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);