version 1.264, 2015/09/04 03:57:38 |
version 1.265, 2015/09/04 04:55:24 |
|
|
char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
struct addrinfo *ai; |
struct addrinfo *ai; |
|
|
debug2("ssh_connect: needpriv %d", needpriv); |
debug2("%s: needpriv %d", __func__, needpriv); |
|
|
for (attempt = 0; attempt < connection_attempts; attempt++) { |
for (attempt = 0; attempt < connection_attempts; attempt++) { |
if (attempt > 0) { |
if (attempt > 0) { |
|
|
if (getnameinfo(ai->ai_addr, ai->ai_addrlen, |
if (getnameinfo(ai->ai_addr, ai->ai_addrlen, |
ntop, sizeof(ntop), strport, sizeof(strport), |
ntop, sizeof(ntop), strport, sizeof(strport), |
NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
error("ssh_connect: getnameinfo failed"); |
error("%s: getnameinfo failed", __func__); |
continue; |
continue; |
} |
} |
debug("Connecting to %.200s [%.100s] port %s.", |
debug("Connecting to %.200s [%.100s] port %s.", |