summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/lib/dns/zt.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib/dns/zt.c')
-rw-r--r--usr.sbin/bind/lib/dns/zt.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/usr.sbin/bind/lib/dns/zt.c b/usr.sbin/bind/lib/dns/zt.c
index 0ec7abeca53..2c3bb860fba 100644
--- a/usr.sbin/bind/lib/dns/zt.c
+++ b/usr.sbin/bind/lib/dns/zt.c
@@ -1,21 +1,21 @@
/*
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: zt.c,v 1.33 2001/06/04 19:33:19 tale Exp $ */
+/* $ISC: zt.c,v 1.33.12.6 2004/03/08 21:06:28 marka Exp $ */
#include <config.h>
@@ -58,7 +58,7 @@ dns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, dns_zt_t **ztp) {
REQUIRE(ztp != NULL && *ztp == NULL);
- zt = isc_mem_get(mctx, sizeof *zt);
+ zt = isc_mem_get(mctx, sizeof(*zt));
if (zt == NULL)
return (ISC_R_NOMEMORY);
@@ -88,7 +88,7 @@ dns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, dns_zt_t **ztp) {
dns_rbt_destroy(&zt->table);
cleanup_zt:
- isc_mem_put(mctx, zt, sizeof *zt);
+ isc_mem_put(mctx, zt, sizeof(*zt));
return (result);
}
@@ -148,7 +148,7 @@ dns_zt_find(dns_zt_t *zt, dns_name_t *name, unsigned int options,
RWLOCK(&zt->rwlock, isc_rwlocktype_read);
result = dns_rbt_findname(zt->table, name, rbtoptions, foundname,
- (void **)&dummy);
+ (void **) (void*)&dummy);
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
dns_zone_attach(dummy, zonep);
@@ -204,7 +204,7 @@ zt_flushanddetach(dns_zt_t **ztp, isc_boolean_t need_flush) {
dns_rbt_destroy(&zt->table);
isc_rwlock_destroy(&zt->rwlock);
zt->magic = 0;
- isc_mem_put(zt->mctx, zt, sizeof *zt);
+ isc_mem_put(zt->mctx, zt, sizeof(*zt));
}
*ztp = NULL;
@@ -234,8 +234,12 @@ dns_zt_load(dns_zt_t *zt, isc_boolean_t stop) {
static isc_result_t
load(dns_zone_t *zone, void *uap) {
+ isc_result_t result;
UNUSED(uap);
- return (dns_zone_load(zone));
+ result = dns_zone_load(zone);
+ if (result == DNS_R_CONTINUE || result == DNS_R_UPTODATE)
+ result = ISC_R_SUCCESS;
+ return (result);
}
isc_result_t
@@ -252,8 +256,13 @@ dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop) {
static isc_result_t
loadnew(dns_zone_t *zone, void *uap) {
+ isc_result_t result;
UNUSED(uap);
- return (dns_zone_loadnew(zone));
+ result = dns_zone_loadnew(zone);
+ if (result == DNS_R_CONTINUE || result == DNS_R_UPTODATE ||
+ result == DNS_R_DYNAMIC)
+ result = ISC_R_SUCCESS;
+ return (result);
}
isc_result_t