diff --git a/CHANGES b/CHANGES index 9fa7c71fad..6823e7f41c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,9 @@ 1740. [placeholder] rt12729 -1739. [placeholder] rt12695 +1739. [bug] dns_rbt_deletetree() could incorrectly return + ISC_R_QUOTA. [RT #12695] -1738. [placeholder] rt12695 +1738. [bug] Enable overrun checking by default. [RT #12695] 1737. [bug] named failed if more than 16 masters were specified. [RT #12627] diff --git a/lib/dns/include/dns/rbt.h b/lib/dns/include/dns/rbt.h index adee9c361b..d3461aa3fb 100644 --- a/lib/dns/include/dns/rbt.h +++ b/lib/dns/include/dns/rbt.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbt.h,v 1.59 2004/03/05 05:09:45 marka Exp $ */ +/* $Id: rbt.h,v 1.60 2004/10/11 05:49:29 marka Exp $ */ #ifndef DNS_RBT_H #define DNS_RBT_H 1 @@ -603,15 +603,18 @@ dns_rbt_destroy(dns_rbt_t **rbtp); isc_result_t dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum); /* - * Stop working with a red-black tree of trees. Once dns_rbt_destroy2() - * has been called on a 'rbt' only dns_rbt_destroy() or dns_rbt_destroy2() - * may be used on the tree. If 'quantum' is zero then the entire tree will - * be destroyed. - * + * Stop working with a red-black tree of trees. + * If 'quantum' is zero then the entire tree will be destroyed. + * If 'quantum' is non zero then up to 'quantum' nodes will be destroyed + * allowing the rbt to be incrementally destroyed by repeated calls to + * dns_rbt_destroy2(). Once dns_rbt_destroy2() has been called no other + * operations than dns_rbt_destroy()/dns_rbt_destroy2() should be + * performed on the tree of trees. + * * Requires: * *rbt is a valid rbt manager. * - * Ensures: + * Ensures on ISC_R_SUCCESS: * All space allocated by the RBT library has been returned. * * *rbt is invalidated as an rbt manager. diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index f466e2e423..fa6684d440 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbt.c,v 1.128 2004/03/05 05:09:22 marka Exp $ */ +/* $Id: rbt.c,v 1.129 2004/10/11 05:49:28 marka Exp $ */ /* Principal Authors: DCL */ @@ -2021,8 +2021,6 @@ dns_rbt_deletetree(dns_rbt_t *rbt, dns_rbtnode_t *node) { done: if (result != ISC_R_SUCCESS) return (result); - if (rbt->quantum != 0 && --rbt->quantum == 0) - return (ISC_R_QUOTA); if (DATA(node) != NULL && rbt->data_deleter != NULL) rbt->data_deleter(DATA(node), rbt->deleter_arg); diff --git a/lib/isc/include/isc/mem.h b/lib/isc/include/isc/mem.h index 4a797fd606..ec676f007c 100644 --- a/lib/isc/include/isc/mem.h +++ b/lib/isc/include/isc/mem.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.h,v 1.59 2004/03/05 05:10:58 marka Exp $ */ +/* $Id: mem.h,v 1.60 2004/10/11 05:49:29 marka Exp $ */ #ifndef ISC_MEM_H #define ISC_MEM_H 1 @@ -58,7 +58,7 @@ typedef void (*isc_memfree_t)(void *, void *); * the requested space. This will increase the size of each allocation. */ #ifndef ISC_MEM_CHECKOVERRUN -#define ISC_MEM_CHECKOVERRUN 0 +#define ISC_MEM_CHECKOVERRUN 1 #endif /*