adig: fix NAPTR parsing

I ran across a small "issue" in your adig example.

It is simply the last part of the NAPTR record, the replacement element,
which is not a string, as currently handled in adig, but a domain name.
pull/1/head
Patrik Thunstrom 14 years ago committed by Daniel Stenberg
parent 6cc3521ec9
commit e9386cfd9f
  1. 2
      adig.c

@ -744,7 +744,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
ares_free_string(name.as_char); ares_free_string(name.as_char);
p += len; p += len;
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); status = ares_expand_name(p, abuf, alen, &name.as_char, &len);
if (status != ARES_SUCCESS) if (status != ARES_SUCCESS)
return NULL; return NULL;
printf("\t\t\t\t\t\t%s", name.as_char); printf("\t\t\t\t\t\t%s", name.as_char);

Loading…
Cancel
Save