adig: Differentiate between internal and server error

Should not output "Got answer" if there was no answer from the
server, instead should just output the internal error.

Fix By: Gisle Vanem (@gvanem)
pull/698/head
Brad House 10 months ago
parent 7963c519fc
commit e10b16a123
  1. 8
      src/tools/adig.c

@ -743,7 +743,13 @@ static void callback(void *arg, int status, int timeouts, unsigned char *abuf,
(void)arg;
(void)timeouts;
printf(";; Got answer:");
/* We got a "Server status" */
if (status >= ARES_SUCCESS && status <= ARES_EREFUSED) {
printf(";; Got answer:");
} else {
printf(";;");
}
if (status != ARES_SUCCESS) {
printf(" %s", ares_strerror(status));
}

Loading…
Cancel
Save