- markus@cvs.openbsd.org 2006/10/10 10:12:45
[sshconnect.c] sleep before retrying (not after) since sleep changes errno; fixes pr 5250; rad@twig.com; ok dtucker djm
This commit is contained in:
parent
990b1a80b5
commit
f4bcd10c4c
|
@ -13,6 +13,10 @@
|
||||||
[session.c]
|
[session.c]
|
||||||
xmalloc -> xcalloc that was missed previously, from portable
|
xmalloc -> xcalloc that was missed previously, from portable
|
||||||
(NB. Id sync only for portable, obviously)
|
(NB. Id sync only for portable, obviously)
|
||||||
|
- markus@cvs.openbsd.org 2006/10/10 10:12:45
|
||||||
|
[sshconnect.c]
|
||||||
|
sleep before retrying (not after) since sleep changes errno; fixes
|
||||||
|
pr 5250; rad@twig.com; ok dtucker djm
|
||||||
|
|
||||||
20061018
|
20061018
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
@ -2554,4 +2558,4 @@
|
||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4575 2006/10/23 17:01:56 djm Exp $
|
$Id: ChangeLog,v 1.4576 2006/10/23 17:02:23 djm Exp $
|
||||||
|
|
11
sshconnect.c
11
sshconnect.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sshconnect.c,v 1.199 2006/08/03 03:34:42 deraadt Exp $ */
|
/* $OpenBSD: sshconnect.c,v 1.200 2006/10/10 10:12:45 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -324,9 +324,11 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
|
||||||
gai_strerror(gaierr));
|
gai_strerror(gaierr));
|
||||||
|
|
||||||
for (attempt = 0; attempt < connection_attempts; attempt++) {
|
for (attempt = 0; attempt < connection_attempts; attempt++) {
|
||||||
if (attempt > 0)
|
if (attempt > 0) {
|
||||||
|
/* Sleep a moment before retrying. */
|
||||||
|
sleep(1);
|
||||||
debug("Trying again...");
|
debug("Trying again...");
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Loop through addresses for this host, and try each one in
|
* Loop through addresses for this host, and try each one in
|
||||||
* sequence until the connection succeeds.
|
* sequence until the connection succeeds.
|
||||||
|
@ -363,9 +365,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
|
||||||
}
|
}
|
||||||
if (sock != -1)
|
if (sock != -1)
|
||||||
break; /* Successful connection. */
|
break; /* Successful connection. */
|
||||||
|
|
||||||
/* Sleep a moment before retrying. */
|
|
||||||
sleep(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
freeaddrinfo(aitop);
|
freeaddrinfo(aitop);
|
||||||
|
|
Loading…
Reference in New Issue