summaryrefslogtreecommitdiff
path: root/minires
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2008-02-28 21:21:56 +0000
committerDavid Hankins <dhankins@isc.org>2008-02-28 21:21:56 +0000
commit66cebfcb89712e946bb564e88e35f46a7f4e00f4 (patch)
tree436afd0222bf30f1e0894afaef716980d8f355c5 /minires
parent3004d0a31848daade58e34187289d1fcf3f274aa (diff)
downloadisc-dhcp-66cebfcb89712e946bb564e88e35f46a7f4e00f4.tar.gz
- ./configure was extended to cover many optional build features, such
as failover, server tracing, debugging, and the execute() command. [ISC-Bugs #17678]
Diffstat (limited to 'minires')
-rw-r--r--minires/res_init.c11
-rw-r--r--minires/res_mkupdate.c3
-rw-r--r--minires/res_query.c14
3 files changed, 3 insertions, 25 deletions
diff --git a/minires/res_init.c b/minires/res_init.c
index b96b326b..b38fdbf0 100644
--- a/minires/res_init.c
+++ b/minires/res_init.c
@@ -76,7 +76,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.10 2007/10/01 14:47:35 explorer Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.11 2008/02/28 21:21:56 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -99,7 +99,6 @@ static const char rcsid[] = "$Id: res_init.c,v 1.10 2007/10/01 14:47:35 explorer
/* Options. Should all be left alone. */
#define RESOLVSORT
#define RFC1535
-#define DEBUG
static void res_setoptions (res_state, const char *, const char *);
@@ -389,14 +388,12 @@ minires_vinit(res_state statp, int preinit) {
dots--;
}
*pp = NULL;
-#ifdef DEBUG
if (statp->options & RES_DEBUG) {
printf(";; res_init()... default dnsrch list:\n");
for (pp = statp->dnsrch; *pp; pp++)
printf(";;\t%s\n", *pp);
printf(";;\t..END..\n");
}
-#endif
#endif /* !RFC1535 */
}
@@ -411,11 +408,9 @@ res_setoptions(res_state statp, const char *options, const char *source) {
const char *cp = options;
int i;
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; res_setoptions(\"%s\", \"%s\")...\n",
options, source);
-#endif
while (*cp) {
/* skip leading and inner runs of spaces */
while (*cp == ' ' || *cp == '\t')
@@ -427,10 +422,8 @@ res_setoptions(res_state statp, const char *options, const char *source) {
statp->ndots = i;
else
statp->ndots = RES_MAXNDOTS;
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";;\tndots=%d\n", statp->ndots);
-#endif
} else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) {
i = atoi(cp + sizeof("timeout:") - 1);
if (i <= RES_MAXRETRANS)
@@ -444,14 +437,12 @@ res_setoptions(res_state statp, const char *options, const char *source) {
else
statp->retry = RES_MAXRETRY;
} else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
-#ifdef DEBUG
if (!(statp->options & RES_DEBUG)) {
printf(";; res_setoptions(\"%s\", \"%s\")..\n",
options, source);
statp->options |= RES_DEBUG;
}
printf(";;\tdebug\n");
-#endif
} else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
statp->options |= RES_USE_INET6;
} else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
diff --git a/minires/res_mkupdate.c b/minires/res_mkupdate.c
index f8d84004..368bcb05 100644
--- a/minires/res_mkupdate.c
+++ b/minires/res_mkupdate.c
@@ -27,7 +27,7 @@
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.11 2007/07/13 06:43:42 shane Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.12 2008/02/28 21:21:56 dhankins Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -50,7 +50,6 @@ static const char rcsid[] = "$Id: res_mkupdate.c,v 1.11 2007/07/13 06:43:42 shan
#include "arpa/nameser.h"
/* Options. Leave them on. */
-#define DEBUG
#define MAXPORT 1024
static int getnum_str(const u_char **, const u_char *);
diff --git a/minires/res_query.c b/minires/res_query.c
index ff119e4c..606c984c 100644
--- a/minires/res_query.c
+++ b/minires/res_query.c
@@ -76,7 +76,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_query.c,v 1.8 2007/09/05 17:32:10 dhankins Exp $";
+static const char rcsid[] = "$Id: res_query.c,v 1.9 2008/02/28 21:21:56 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -95,8 +95,6 @@ static const char rcsid[] = "$Id: res_query.c,v 1.8 2007/09/05 17:32:10 dhankins
#include "arpa/nameser.h"
/* Options. Leave them on. */
-#define DEBUG
-
#if PACKETSZ > 1024
#define MAXPACKET PACKETSZ
#else
@@ -128,37 +126,29 @@ res_nquery(res_state statp,
hp->rcode = NOERROR; /* default */
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; res_query(%s, %d, %d)\n", name, class, type);
-#endif
rcode = res_nmkquery(statp, QUERY, name, class, type, NULL, 0, NULL,
buf, sizeof(buf), &n);
if (rcode != ISC_R_SUCCESS) {
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; res_query: mkquery failed\n");
-#endif
RES_SET_H_ERRNO(statp, NO_RECOVERY);
return rcode;
}
rcode = res_nsend(statp, buf, n, answer, anslen, &n);
if (rcode != ISC_R_SUCCESS) {
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; res_query: send error\n");
-#endif
RES_SET_H_ERRNO(statp, TRY_AGAIN);
return rcode;
}
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; rcode = %d, ancount=%d\n", hp->rcode,
ntohs(hp->ancount));
-#endif
switch (hp->rcode) {
case NXDOMAIN:
RES_SET_H_ERRNO(statp, HOST_NOT_FOUND);
@@ -347,11 +337,9 @@ res_nquerydomain(res_state statp,
const char *longname = nbuf;
int n, d;
-#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; res_nquerydomain(%s, %s, %d, %d)\n",
name, domain?domain:"<Nil>", class, type);
-#endif
if (domain == NULL) {
/*
* Check for trailing '.';