for (try = 0; try < statp->retry; try++) {
for (ns = 0; ns < MAXNS; ns++)
{
+#ifdef DEBUG
+ char tmpbuf[40];
+#endif
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
if (nsap == NULL)
}
#endif
-#ifdef DEBUG
- char tmpbuf[40];
-#endif
Dprint(statp->options & RES_DEBUG,
(stdout, ";; Querying server (# %d) address = %s\n",
ns + 1, inet_ntop(AF_INET6, &nsap->sin6_addr,
(statp->pfcode & RES_PRF_REPLY),
(stdout, "%s", ""),
ans, (resplen > anssiz) ? anssiz : resplen);
- if (buf2 != NULL)
+ if (buf2 != NULL) {
DprintQ((statp->options & RES_DEBUG) ||
(statp->pfcode & RES_PRF_REPLY),
(stdout, "%s", ""),
*ansp2, (*resplen2 > *nansp2) ? *nansp2 : *resplen2);
+ }
/*
* If we have temporarily opened a virtual circuit,
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; old answer (unexpected):\n"),
*thisansp,
- (rlen > *thisanssiz) ? *thisanssiz: rlen);
+ (rlen > *thisanssizp) ? *thisanssizp: rlen);
goto read_len;
}
*/
Dprint(statp->options & RES_DEBUG,
(stdout, ";; undersized: %d\n",
- *thisresplen));
+ *thisresplenp));
*terrno = EMSGSIZE;
goto err_out;
}
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; old answer:\n"),
thisansp,
- (*thisresplen > *thisanssiz)
- ? *thisanssiz : *thisresplen);
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
goto wait;
}
if (!(statp->options & RES_INSECURE1) &&
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; not our server:\n"),
thisansp,
- (*thisresplen > *thisanssiz)
- ? *thisanssiz : *thisresplen);
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
goto wait;
}
#ifdef RES_USE_EDNS0
DprintQ(statp->options & RES_DEBUG,
(stdout,
"server rejected query with EDNS0:\n"),
- thisans,
- (*thisresplen > *thisanssiz)
- ? *thisanssiz : *thisresplen);
+ thisansp,
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
/* record the error */
statp->_flags |= RES_F_EDNS0ERR;
goto err_out;
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; wrong query name:\n"),
thisansp,
- (*thisresplen > *thisanssiz)
- ? *thisanssiz : *thisresplen);
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
goto wait;
}
if (anhp->rcode == SERVFAIL ||
DprintQ(statp->options & RES_DEBUG,
(stdout, "server rejected query:\n"),
thisansp,
- (*thisresplen > *thisanssiz)
- ? *thisanssiz : *thisresplen);
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
if (recvresp1 || (buf2 != NULL && recvresp2))
return resplen;
DprintQ(statp->options & RES_DEBUG,
(stdout, "referred query:\n"),
thisansp,
- (*thisresplen > *thisanssiz)
- ? *thisanssiz : *thisresplen);
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
goto next_ns;
}
if (!(statp->options & RES_IGNTC) && anhp->tc) {