summaryrefslogtreecommitdiff
path: root/resolv/res_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res_query.c')
-rw-r--r--resolv/res_query.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c
index b2b45acde7..7102ba948e 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -97,7 +97,8 @@ static const char rcsid[] = "$BINDId: res_query.c,v 8.20 2000/02/29 05:39:12 vix
static int
__libc_res_nquerydomain(res_state statp, const char *name, const char *domain,
int class, int type, u_char *answer, int anslen,
- u_char **answerp, u_char **answerp2, int *nanswerp2);
+ u_char **answerp, u_char **answerp2, int *nanswerp2,
+ int *resplen2);
/*
* Formulate a normal query, send, and await answer.
@@ -117,7 +118,8 @@ __libc_res_nquery(res_state statp,
int anslen, /* size of answer buffer */
u_char **answerp, /* if buffer needs to be enlarged */
u_char **answerp2,
- int *nanswerp2)
+ int *nanswerp2,
+ int *resplen2)
{
HEADER *hp = (HEADER *) answer;
int n, use_malloc = 0;
@@ -221,7 +223,7 @@ __libc_res_nquery(res_state statp,
}
assert (answerp == NULL || (void *) *answerp == (void *) answer);
n = __libc_res_nsend(statp, query1, nquery1, query2, nquery2, answer,
- anslen, answerp, answerp2, nanswerp2);
+ anslen, answerp, answerp2, nanswerp2, resplen2);
if (use_malloc)
free (buf);
if (n < 0) {
@@ -307,7 +309,7 @@ res_nquery(res_state statp,
int anslen) /* size of answer buffer */
{
return __libc_res_nquery(statp, name, class, type, answer, anslen,
- NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL);
}
libresolv_hidden_def (res_nquery)
@@ -325,7 +327,8 @@ __libc_res_nsearch(res_state statp,
int anslen, /* size of answer */
u_char **answerp,
u_char **answerp2,
- int *nanswerp2)
+ int *nanswerp2,
+ int *resplen2)
{
const char *cp, * const *domain;
HEADER *hp = (HEADER *) answer;
@@ -349,7 +352,7 @@ __libc_res_nsearch(res_state statp,
if (!dots && (cp = res_hostalias(statp, name, tmp, sizeof tmp))!= NULL)
return (__libc_res_nquery(statp, cp, class, type, answer,
anslen, answerp, answerp2,
- nanswerp2));
+ nanswerp2, resplen2));
#ifdef DEBUG
if (statp->options & RES_DEBUG)
@@ -366,7 +369,7 @@ __libc_res_nsearch(res_state statp,
if (dots >= statp->ndots || trailing_dot) {
ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
answer, anslen, answerp,
- answerp2, nanswerp2);
+ answerp2, nanswerp2, resplen2);
if (ret > 0 || trailing_dot)
return (ret);
saved_herrno = h_errno;
@@ -404,7 +407,8 @@ __libc_res_nsearch(res_state statp,
ret = __libc_res_nquerydomain(statp, name, *domain,
class, type,
answer, anslen, answerp,
- answerp2, nanswerp2);
+ answerp2, nanswerp2,
+ resplen2);
if (ret > 0)
return (ret);
@@ -473,7 +477,7 @@ __libc_res_nsearch(res_state statp,
if (dots && !(tried_as_is || root_on_list)) {
ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
answer, anslen, answerp,
- answerp2, nanswerp2);
+ answerp2, nanswerp2, resplen2);
if (ret > 0)
return (ret);
}
@@ -508,7 +512,7 @@ res_nsearch(res_state statp,
int anslen) /* size of answer */
{
return __libc_res_nsearch(statp, name, class, type, answer,
- anslen, NULL, NULL, NULL);
+ anslen, NULL, NULL, NULL, NULL);
}
libresolv_hidden_def (res_nsearch)
@@ -525,7 +529,8 @@ __libc_res_nquerydomain(res_state statp,
int anslen, /* size of answer */
u_char **answerp,
u_char **answerp2,
- int *nanswerp2)
+ int *nanswerp2,
+ int *resplen2)
{
char nbuf[MAXDNAME];
const char *longname = nbuf;
@@ -562,7 +567,8 @@ __libc_res_nquerydomain(res_state statp,
sprintf(nbuf, "%s.%s", name, domain);
}
return (__libc_res_nquery(statp, longname, class, type, answer,
- anslen, answerp, answerp2, nanswerp2));
+ anslen, answerp, answerp2, nanswerp2,
+ resplen2));
}
int
@@ -574,7 +580,7 @@ res_nquerydomain(res_state statp,
int anslen) /* size of answer */
{
return __libc_res_nquerydomain(statp, name, domain, class, type,
- answer, anslen, NULL, NULL, NULL);
+ answer, anslen, NULL, NULL, NULL, NULL);
}
libresolv_hidden_def (res_nquerydomain)