mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Fix places where wrong tag was used in #ifdef's
This commit is contained in:
parent
3308ba7ebd
commit
7a87d1c63b
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.116 2000/10/18 22:11:20 gson Exp $ */
|
||||
/* $Id: dig.c,v 1.117 2000/10/19 21:49:47 mws Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
@ -843,15 +843,15 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
switch (cmd[1]) {
|
||||
default:
|
||||
case 'c': /* vc, and default */
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
if (!is_batchfile)
|
||||
lookup->tcp_mode = state;
|
||||
break;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
case 'i': /* view */
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
@ -868,7 +868,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
goto invalid_option;
|
||||
strncpy(lookup->zonename, value, MXNAME);
|
||||
break;
|
||||
#endif
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
default:
|
||||
invalid_option:
|
||||
need_value:
|
||||
|
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dighost.c,v 1.151 2000/10/19 17:30:14 gson Exp $ */
|
||||
/* $Id: dighost.c,v 1.152 2000/10/19 21:49:49 mws Exp $ */
|
||||
|
||||
/*
|
||||
* Notice to programmers: Do not use this code as an example of how to
|
||||
@ -321,10 +321,10 @@ make_empty_lookup(void) {
|
||||
looknew->section_authority = ISC_TRUE;
|
||||
looknew->section_additional = ISC_TRUE;
|
||||
looknew->new_search = ISC_FALSE;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
looknew->zonename[0] = 0;
|
||||
looknew->viewname[0] = 0;
|
||||
#endif
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
ISC_LIST_INIT(looknew->q);
|
||||
ISC_LIST_INIT(looknew->my_server_list);
|
||||
return (looknew);
|
||||
@ -373,10 +373,10 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
|
||||
looknew->section_authority = lookold->section_authority;
|
||||
looknew->section_additional = lookold->section_additional;
|
||||
looknew->retries = lookold->retries;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
strncpy(looknew->viewname, lookold-> viewname, MXNAME);
|
||||
strncpy(looknew->zonename, lookold-> zonename, MXNAME);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
|
||||
if (servers)
|
||||
clone_server_list(lookold->my_server_list,
|
||||
@ -716,13 +716,13 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, dns_optlist_t optlist) {
|
||||
dns_rdatalist_t *rdatalist = NULL;
|
||||
dns_rdata_t *rdata = NULL;
|
||||
isc_result_t result;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
isc_buffer_t *rdatabuf = NULL;
|
||||
unsigned int i, optsize = 0;
|
||||
#else /* DNS_OPT_NEWCODES */
|
||||
#else /* DNS_OPT_NEWCODES_LIVE */
|
||||
|
||||
UNUSED(optlist);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
|
||||
debug("add_opt()");
|
||||
result = dns_message_gettemprdataset(msg, &rdataset);
|
||||
@ -740,7 +740,7 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, dns_optlist_t optlist) {
|
||||
rdatalist->ttl = 0;
|
||||
rdata->data = NULL;
|
||||
rdata->length = 0;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
for (i=0; i<optlist.used; i++)
|
||||
optsize += optlist.attrs[i].value.length + 4;
|
||||
result = isc_buffer_allocate(mctx, &rdatabuf, optsize);
|
||||
@ -748,7 +748,7 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, dns_optlist_t optlist) {
|
||||
result = dns_opt_add(rdata, &optlist, rdatabuf);
|
||||
check_result(result, "dns_opt_add");
|
||||
dns_message_takebuffer(msg, &rdatabuf);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
ISC_LIST_INIT(rdatalist->rdata);
|
||||
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
|
||||
dns_rdatalist_tordataset(rdatalist, rdataset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user