mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
removed dns_zt_print(), dns_zone_print(), dns_zone_tostr(),
PRINT_ZONE_REF; these were only used by the zone2_test program which has now been removed
This commit is contained in:
parent
924fbebfbe
commit
ff59f0e4fe
3
CHANGES
3
CHANGES
@ -2,7 +2,8 @@
|
|||||||
386. [bug] Missing strdup() of ACL name caused random
|
386. [bug] Missing strdup() of ACL name caused random
|
||||||
ACL matching failures [RT #228].
|
ACL matching failures [RT #228].
|
||||||
|
|
||||||
385. [cleanup] Removed function dns_zone_equal().
|
385. [cleanup] Removed functions dns_zone_equal(), dns_zone_print(),
|
||||||
|
and dns_zt_print().
|
||||||
|
|
||||||
384. [bug] nsupdate was incorrectly limiting TTLs to 65535 instead
|
384. [bug] nsupdate was incorrectly limiting TTLs to 65535 instead
|
||||||
of 2147483647.
|
of 2147483647.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zone.h,v 1.68 2000/08/10 18:35:44 gson Exp $ */
|
/* $Id: zone.h,v 1.69 2000/08/13 23:51:55 gson Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_ZONE_H
|
#ifndef DNS_ZONE_H
|
||||||
#define DNS_ZONE_H 1
|
#define DNS_ZONE_H 1
|
||||||
@ -893,12 +893,6 @@ dns_zone_setssutable(dns_zone_t *zone, dns_ssutable_t *table);
|
|||||||
* 'zone' to be a valid zone.
|
* 'zone' to be a valid zone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
|
||||||
dns_zone_print(dns_zone_t *zone);
|
|
||||||
/*
|
|
||||||
* test use only
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_mem_t *
|
isc_mem_t *
|
||||||
dns_zone_getmctx(dns_zone_t *zone);
|
dns_zone_getmctx(dns_zone_t *zone);
|
||||||
/*
|
/*
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zone.c,v 1.182 2000/08/10 19:50:02 gson Exp $ */
|
/* $Id: zone.c,v 1.183 2000/08/13 23:51:52 gson Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -242,8 +242,6 @@ static void cancel_refresh(dns_zone_t *);
|
|||||||
static void zone_log(dns_zone_t *zone, const char *, int, const char *msg,
|
static void zone_log(dns_zone_t *zone, const char *, int, const char *msg,
|
||||||
...);
|
...);
|
||||||
static void queue_xfrin(dns_zone_t *zone);
|
static void queue_xfrin(dns_zone_t *zone);
|
||||||
static isc_result_t dns_zone_tostr(dns_zone_t *zone, isc_mem_t *mctx,
|
|
||||||
char **s);
|
|
||||||
static void zone_unload(dns_zone_t *zone);
|
static void zone_unload(dns_zone_t *zone);
|
||||||
static void zone_expire(dns_zone_t *zone);
|
static void zone_expire(dns_zone_t *zone);
|
||||||
#ifndef NOMINUM_PUBLIC
|
#ifndef NOMINUM_PUBLIC
|
||||||
@ -289,18 +287,6 @@ zone_get_from_db(dns_db_t *db, dns_name_t *origin, unsigned int *nscount,
|
|||||||
|
|
||||||
static void zone_freedbargs(dns_zone_t *zone);
|
static void zone_freedbargs(dns_zone_t *zone);
|
||||||
|
|
||||||
#define PRINT_ZONE_REF(zone) \
|
|
||||||
do { \
|
|
||||||
char *s = NULL; \
|
|
||||||
isc_result_t r; \
|
|
||||||
r = dns_zone_tostr(zone, zone->mctx, &s); \
|
|
||||||
if (r == ISC_R_SUCCESS) { \
|
|
||||||
printf("%p: %s: erefs=%d irefs=%d\n", zone, s, \
|
|
||||||
zone->erefs, zone->irefs); \
|
|
||||||
isc_mem_free(zone->mctx, s); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define ZONE_LOG(x,y) zone_log(zone, me, ISC_LOG_DEBUG(x), y)
|
#define ZONE_LOG(x,y) zone_log(zone, me, ISC_LOG_DEBUG(x), y)
|
||||||
#define DNS_ENTER zone_log(zone, me, ISC_LOG_DEBUG(1), "enter")
|
#define DNS_ENTER zone_log(zone, me, ISC_LOG_DEBUG(1), "enter")
|
||||||
#define DNS_LEAVE zone_log(zone, me, ISC_LOG_DEBUG(1), "leave")
|
#define DNS_LEAVE zone_log(zone, me, ISC_LOG_DEBUG(1), "leave")
|
||||||
@ -1147,13 +1133,6 @@ dns_zone_idetach(dns_zone_t **zonep) {
|
|||||||
exit_check(zone);
|
exit_check(zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
dns_zone_print(dns_zone_t *zone) {
|
|
||||||
REQUIRE(DNS_ZONE_VALID(zone));
|
|
||||||
|
|
||||||
PRINT_ZONE_REF(zone);
|
|
||||||
}
|
|
||||||
|
|
||||||
isc_mem_t *
|
isc_mem_t *
|
||||||
dns_zone_getmctx(dns_zone_t *zone) {
|
dns_zone_getmctx(dns_zone_t *zone) {
|
||||||
REQUIRE(DNS_ZONE_VALID(zone));
|
REQUIRE(DNS_ZONE_VALID(zone));
|
||||||
@ -1168,33 +1147,6 @@ dns_zone_getmgr(dns_zone_t *zone) {
|
|||||||
return (zone->zmgr);
|
return (zone->zmgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
|
||||||
dns_zone_tostr(dns_zone_t *zone, isc_mem_t *mctx, char **s) {
|
|
||||||
isc_buffer_t tbuf;
|
|
||||||
char outbuf[1024];
|
|
||||||
isc_result_t result;
|
|
||||||
|
|
||||||
REQUIRE(s != NULL && *s == NULL);
|
|
||||||
REQUIRE(DNS_ZONE_VALID(zone));
|
|
||||||
|
|
||||||
isc_buffer_init(&tbuf, outbuf, sizeof(outbuf) - 1);
|
|
||||||
if (dns_name_countlabels(&zone->origin) > 0) {
|
|
||||||
result = dns_name_totext(&zone->origin, ISC_FALSE, &tbuf);
|
|
||||||
if (result == ISC_R_SUCCESS)
|
|
||||||
outbuf[tbuf.used] = '\0';
|
|
||||||
else {
|
|
||||||
strncpy(outbuf, "<name conversion failed>",
|
|
||||||
sizeof outbuf - 1);
|
|
||||||
outbuf[sizeof outbuf - 1] = '\0';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
strncpy(outbuf, "<unnamed zone>", sizeof outbuf - 1);
|
|
||||||
outbuf[sizeof outbuf - 1] = '\0';
|
|
||||||
}
|
|
||||||
*s = isc_mem_strdup(mctx, outbuf);
|
|
||||||
return ((*s == NULL) ? ISC_R_NOMEMORY : ISC_R_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dns_zone_setflag(dns_zone_t *zone, unsigned int flags, isc_boolean_t value) {
|
dns_zone_setflag(dns_zone_t *zone, unsigned int flags, isc_boolean_t value) {
|
||||||
REQUIRE(DNS_ZONE_VALID(zone));
|
REQUIRE(DNS_ZONE_VALID(zone));
|
||||||
|
30
lib/dns/zt.c
30
lib/dns/zt.c
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zt.c,v 1.24 2000/08/01 01:23:12 tale Exp $ */
|
/* $Id: zt.c,v 1.25 2000/08/13 23:51:53 gson Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -199,34 +199,6 @@ dns_zt_detach(dns_zt_t **ztp) {
|
|||||||
*ztp = NULL;
|
*ztp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
dns_zt_print(dns_zt_t *zt) {
|
|
||||||
dns_rbtnode_t *node;
|
|
||||||
dns_rbtnodechain_t chain;
|
|
||||||
isc_result_t result;
|
|
||||||
dns_zone_t *zone;
|
|
||||||
|
|
||||||
REQUIRE(VALID_ZT(zt));
|
|
||||||
|
|
||||||
RWLOCK(&zt->rwlock, isc_rwlocktype_read);
|
|
||||||
|
|
||||||
dns_rbtnodechain_init(&chain, zt->mctx);
|
|
||||||
result = dns_rbtnodechain_first(&chain, zt->table, NULL, NULL);
|
|
||||||
while (result == DNS_R_NEWORIGIN || result == ISC_R_SUCCESS) {
|
|
||||||
result = dns_rbtnodechain_current(&chain, NULL, NULL,
|
|
||||||
&node);
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
|
||||||
zone = node->data;
|
|
||||||
if (zone != NULL)
|
|
||||||
(void)dns_zone_print(zone);
|
|
||||||
}
|
|
||||||
result = dns_rbtnodechain_next(&chain, NULL, NULL);
|
|
||||||
}
|
|
||||||
dns_rbtnodechain_invalidate(&chain);
|
|
||||||
|
|
||||||
RWUNLOCK(&zt->rwlock, isc_rwlocktype_read);
|
|
||||||
}
|
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_zt_load(dns_zt_t *zt, isc_boolean_t stop) {
|
dns_zt_load(dns_zt_t *zt, isc_boolean_t stop) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user