|
Lines 319-327
Link Here
|
| 319 |
hints.ai_family = family; |
319 |
hints.ai_family = family; |
| 320 |
hints.ai_socktype = SOCK_STREAM; |
320 |
hints.ai_socktype = SOCK_STREAM; |
| 321 |
snprintf(strport, sizeof strport, "%u", port); |
321 |
snprintf(strport, sizeof strport, "%u", port); |
| 322 |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) |
322 |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) { |
| 323 |
fatal("%s: %.100s: %s", __progname, host, |
323 |
fatal("%s: Error resolving hostname %.100s: %s", __progname, host, (EAI_SYSTEM == gaierr) ? strerror(errno) : gai_strerror(gaierr)); |
| 324 |
gai_strerror(gaierr)); |
324 |
} |
| 325 |
|
325 |
|
| 326 |
for (attempt = 0; attempt < connection_attempts; attempt++) { |
326 |
for (attempt = 0; attempt < connection_attempts; attempt++) { |
| 327 |
if (attempt > 0) { |
327 |
if (attempt > 0) { |