summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-11 04:00:19 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-11 04:00:19 +0000
commita6cd75c49ed90186bb400c08b8878c2c711b9f58 (patch)
tree584347b996c032bd251c719efc61f989b1e2645f /sshconnect.c
parent9c44554a41cbefdd4898511607d997072aed2811 (diff)
downloadopenssh-git-a6cd75c49ed90186bb400c08b8878c2c711b9f58.tar.gz
- itojun@cvs.openbsd.org 2002/07/10 10:28:15
[sshconnect.c] bark if all connection attempt fails.
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sshconnect.c b/sshconnect.c
index ba5deb44..ae6c5f32 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.129 2002/07/09 12:04:02 itojun Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.130 2002/07/10 10:28:15 itojun Exp $");
#include <openssl/bn.h>
@@ -309,11 +309,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
} else {
if (errno == ECONNREFUSED)
full_failure = 0;
-#if 0
- log("ssh: connect to address %s port %s: %s",
- sockaddr_ntop(ai->ai_addr, ai->ai_addrlen),
- strport, strerror(errno));
-#endif
/*
* Close the failed socket; there appear to
* be some problems when reusing a socket for
@@ -336,8 +331,11 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
freeaddrinfo(aitop);
/* Return failure if we didn't get a successful connection. */
- if (attempt >= connection_attempts)
+ if (attempt >= connection_attempts) {
+ log("ssh: connect to host %s port %s: %s",
+ host, strport, strerror(errno));
return full_failure ? ECONNABORTED : ECONNREFUSED;
+ }
debug("Connection established.");