From dcd12febbd47f5846d6c75f6a4dcba8a873bc153 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Sat, 11 Nov 2000 01:05:43 +0000 Subject: [PATCH] dns_zone_configure() does not need to special-case hint zones, because it must never be called for them --- bin/named/zoneconf.c | 44 ++++++++++++++++++++------------------------ lib/dns/zoneconf.c | 44 ++++++++++++++++++++------------------------ 2 files changed, 40 insertions(+), 48 deletions(-) diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 0df7fd12bf..934be8fdf2 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zoneconf.c,v 1.67 2000/11/07 23:49:29 mws Exp $ */ +/* $Id: zoneconf.c,v 1.68 2000/11/11 01:05:43 gson Exp $ */ #include @@ -241,30 +241,26 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_zone_setqueryacl, dns_zone_clearqueryacl)); - if (czone->ztype != dns_c_zone_hint) { - result = dns_c_zone_getdialup(czone, &dialup); - if (result != ISC_R_SUCCESS && cview != NULL) - result = dns_c_view_getdialup(cview, &dialup); - if (result != ISC_R_SUCCESS) - result = dns_c_ctx_getdialup(cctx, &dialup); - if (result != ISC_R_SUCCESS) - dialup = dns_dialuptype_no; - dns_zone_setdialup(zone, dialup); - } + result = dns_c_zone_getdialup(czone, &dialup); + if (result != ISC_R_SUCCESS && cview != NULL) + result = dns_c_view_getdialup(cview, &dialup); + if (result != ISC_R_SUCCESS) + result = dns_c_ctx_getdialup(cctx, &dialup); + if (result != ISC_R_SUCCESS) + dialup = dns_dialuptype_no; + dns_zone_setdialup(zone, dialup); - if (czone->ztype != dns_c_zone_hint) { - result = dns_c_zone_getstatistics(czone, &statistics); - if (result != ISC_R_SUCCESS && cview != NULL) - result = dns_c_view_getstatistics(cview, &statistics); - if (result != ISC_R_SUCCESS) - result = dns_c_ctx_getstatistics(cctx, &statistics); - if (result != ISC_R_SUCCESS) - statistics = ISC_FALSE; - if (statistics) - dns_zone_startcounting(zone); - else - dns_zone_stopcounting(zone); - } + result = dns_c_zone_getstatistics(czone, &statistics); + if (result != ISC_R_SUCCESS && cview != NULL) + result = dns_c_view_getstatistics(cview, &statistics); + if (result != ISC_R_SUCCESS) + result = dns_c_ctx_getstatistics(cctx, &statistics); + if (result != ISC_R_SUCCESS) + statistics = ISC_FALSE; + if (statistics) + dns_zone_startcounting(zone); + else + dns_zone_stopcounting(zone); #ifndef NOMINUM_PUBLIC if (czone->ztype != dns_c_zone_stub) { diff --git a/lib/dns/zoneconf.c b/lib/dns/zoneconf.c index 0df7fd12bf..934be8fdf2 100644 --- a/lib/dns/zoneconf.c +++ b/lib/dns/zoneconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zoneconf.c,v 1.67 2000/11/07 23:49:29 mws Exp $ */ +/* $Id: zoneconf.c,v 1.68 2000/11/11 01:05:43 gson Exp $ */ #include @@ -241,30 +241,26 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_zone_setqueryacl, dns_zone_clearqueryacl)); - if (czone->ztype != dns_c_zone_hint) { - result = dns_c_zone_getdialup(czone, &dialup); - if (result != ISC_R_SUCCESS && cview != NULL) - result = dns_c_view_getdialup(cview, &dialup); - if (result != ISC_R_SUCCESS) - result = dns_c_ctx_getdialup(cctx, &dialup); - if (result != ISC_R_SUCCESS) - dialup = dns_dialuptype_no; - dns_zone_setdialup(zone, dialup); - } + result = dns_c_zone_getdialup(czone, &dialup); + if (result != ISC_R_SUCCESS && cview != NULL) + result = dns_c_view_getdialup(cview, &dialup); + if (result != ISC_R_SUCCESS) + result = dns_c_ctx_getdialup(cctx, &dialup); + if (result != ISC_R_SUCCESS) + dialup = dns_dialuptype_no; + dns_zone_setdialup(zone, dialup); - if (czone->ztype != dns_c_zone_hint) { - result = dns_c_zone_getstatistics(czone, &statistics); - if (result != ISC_R_SUCCESS && cview != NULL) - result = dns_c_view_getstatistics(cview, &statistics); - if (result != ISC_R_SUCCESS) - result = dns_c_ctx_getstatistics(cctx, &statistics); - if (result != ISC_R_SUCCESS) - statistics = ISC_FALSE; - if (statistics) - dns_zone_startcounting(zone); - else - dns_zone_stopcounting(zone); - } + result = dns_c_zone_getstatistics(czone, &statistics); + if (result != ISC_R_SUCCESS && cview != NULL) + result = dns_c_view_getstatistics(cview, &statistics); + if (result != ISC_R_SUCCESS) + result = dns_c_ctx_getstatistics(cctx, &statistics); + if (result != ISC_R_SUCCESS) + statistics = ISC_FALSE; + if (statistics) + dns_zone_startcounting(zone); + else + dns_zone_stopcounting(zone); #ifndef NOMINUM_PUBLIC if (czone->ztype != dns_c_zone_stub) {