Fix error message on DNS error for IPv6 hosts (#27)

pull/34/head
David Schweikert 13 years ago
parent 1bb43dc07f
commit aa5f849c5d

@ -9,6 +9,7 @@ UNRELEAESD David Schweikert <david@schweikert.ch>
* Set default data size to 56 bytes on all architectures (#18)
* Added contrib/fping.spec (Stephen Schaefer, #24)
* Convert man-page source to POD for easier maintenance
* Fix error message on DNS error for IPv6 hosts (#27)
* Man-page fix: TOS option typo (Thomas Liske, #23)
* Man-page fix: inconsistency in regards to numeric arguments (Robert Henney)
* Man-page fix: better description of option -q (#15)

@ -2208,7 +2208,7 @@ void add_name( char *name )
ret_ga = getaddrinfo(name, NULL, &hints, &res);
if (ret_ga) {
if(!quiet_flag)
warnx("%s", gai_strerror(ret_ga));
print_warning("%s: %s\n", name, gai_strerror(ret_ga));
num_noaddress++;
return;
}
@ -2216,7 +2216,7 @@ void add_name( char *name )
else hostname = name;
if (!res->ai_addr) {
if(!quiet_flag)
warnx("getaddrinfo failed");
print_warning("%s: getaddrinfo failed\n", name);
num_noaddress++;
return;
}
@ -2232,7 +2232,7 @@ void add_name( char *name )
64, NULL, 0, NI_NUMERICHOST);
if (ret) {
if(!quiet_flag) {
warnx("%s", gai_strerror(ret_ga));
print_warning("%s: %s\n", name, gai_strerror(ret_ga));
}
num_noaddress++;
return;

Loading…
Cancel
Save