2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

change some logging from INFO to DEBUG

This commit is contained in:
Bob Halley 2000-01-26 21:12:04 +00:00
parent 95ff121ebd
commit 6bfaefc3fd
2 changed files with 43 additions and 31 deletions

View File

@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: xfrin.c,v 1.38 2000/01/25 19:28:59 halley Exp $ */ /* $Id: xfrin.c,v 1.39 2000/01/26 21:12:03 halley Exp $ */
#include <config.h> #include <config.h>
@ -380,7 +380,8 @@ xfr_rr(xfrin_ctx_t *xfr,
case XFRST_SOAQUERY: case XFRST_SOAQUERY:
xfr->end_serial = dns_soa_getserial(rdata); xfr->end_serial = dns_soa_getserial(rdata);
if (!DNS_SERIAL_GT(xfr->end_serial, xfr->ixfr.request_serial)) { if (!DNS_SERIAL_GT(xfr->end_serial, xfr->ixfr.request_serial)) {
xfrin_log(xfr, ISC_LOG_INFO, "requested serial %u, " xfrin_log(xfr, ISC_LOG_DEBUG(3),
"requested serial %u, "
"master has %u, not updating", "master has %u, not updating",
xfr->ixfr.request_serial, xfr->end_serial); xfr->ixfr.request_serial, xfr->end_serial);
FAIL(DNS_R_UPTODATE); FAIL(DNS_R_UPTODATE);
@ -409,7 +410,8 @@ xfr_rr(xfrin_ctx_t *xfr,
* sent when the current version on the master * sent when the current version on the master
* is not newer than the version in the request. * is not newer than the version in the request.
*/ */
xfrin_log(xfr, ISC_LOG_INFO, "requested serial %u, " xfrin_log(xfr, ISC_LOG_DEBUG(3),
"requested serial %u, "
"master has %u, not updating", "master has %u, not updating",
xfr->ixfr.request_serial, xfr->end_serial); xfr->ixfr.request_serial, xfr->end_serial);
FAIL(DNS_R_UPTODATE); FAIL(DNS_R_UPTODATE);
@ -516,12 +518,12 @@ dns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master,
isc_task_setname(task, "xfrin", zone); isc_task_setname(task, "xfrin", zone);
if (db == NULL) { if (db == NULL) {
xfrin_log1(ISC_LOG_INFO, zonename, master, xfrin_log1(ISC_LOG_DEBUG(3), zonename, master,
"no database exists yet, " "no database exists yet, "
"requesting AXFR of initial version"); "requesting AXFR of initial version");
xfrtype = dns_rdatatype_axfr; xfrtype = dns_rdatatype_axfr;
} else { } else {
xfrin_log1(ISC_LOG_INFO, zonename, master, xfrin_log1(ISC_LOG_DEBUG(3), zonename, master,
"database exists, trying IXFR"); "database exists, trying IXFR");
xfrtype = dns_rdatatype_ixfr; xfrtype = dns_rdatatype_ixfr;
} }
@ -809,7 +811,8 @@ xfrin_send_request(xfrin_ctx_t *xfr) {
CHECK(dns_db_createsoatuple(xfr->db, ver, xfr->mctx, CHECK(dns_db_createsoatuple(xfr->db, ver, xfr->mctx,
DNS_DIFFOP_EXISTS, &soatuple)); DNS_DIFFOP_EXISTS, &soatuple));
xfr->ixfr.request_serial = dns_soa_getserial(&soatuple->rdata); xfr->ixfr.request_serial = dns_soa_getserial(&soatuple->rdata);
xfrin_log(xfr, ISC_LOG_INFO, "requesting IXFR for serial %u", xfrin_log(xfr, ISC_LOG_DEBUG(3),
"requesting IXFR for serial %u",
xfr->ixfr.request_serial); xfr->ixfr.request_serial);
CHECK(tuple2msgname(soatuple, msg, &msgsoaname)); CHECK(tuple2msgname(soatuple, msg, &msgsoaname));

View File

@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: zone.c,v 1.62 2000/01/25 19:29:00 halley Exp $ */ /* $Id: zone.c,v 1.63 2000/01/26 21:12:04 halley Exp $ */
#include <config.h> #include <config.h>
@ -190,28 +190,16 @@ struct dns_zonemgr {
ISC_LIST(dns_zone_t) zones; ISC_LIST(dns_zone_t) zones;
}; };
static void refresh_callback(isc_task_t *, isc_event_t *);
static void zone_shutdown(isc_task_t *, isc_event_t *);
static void soa_query(dns_zone_t *, isc_taskaction_t);
static isc_result_t zone_settimer(dns_zone_t *, isc_stdtime_t); static isc_result_t zone_settimer(dns_zone_t *, isc_stdtime_t);
static void cancel_refresh(dns_zone_t *); static void cancel_refresh(dns_zone_t *);
static isc_result_t dns_notify(dns_name_t *, isc_sockaddr_t *, dns_rdatatype_t, static isc_result_t dns_notify(dns_name_t *, isc_sockaddr_t *, dns_rdatatype_t,
dns_rdataclass_t, isc_sockaddr_t *, isc_mem_t *); dns_rdataclass_t, isc_sockaddr_t *, isc_mem_t *);
static void checkservers_callback(isc_task_t *task, isc_event_t *event);
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 int message_count(dns_message_t *msg, dns_section_t section, ...);
dns_rdatatype_t type);
#if 0
static void sockaddr_fromaddr(isc_sockaddr_t *sockaddr, dns_c_addr_t *a,
in_port_t port);
#endif
static void add_address_tocheck(dns_message_t *msg,
dns_zone_checkservers_t *checkservers,
dns_rdatatype_t type);
extern void dns_zone_transfer_in(dns_zone_t *zone); extern void dns_zone_transfer_in(dns_zone_t *zone);
static void record_serial(void); static isc_result_t dns_zone_tostr(dns_zone_t *zone, isc_mem_t *mctx,
static isc_result_t dns_zone_tostr(dns_zone_t *zone, isc_mem_t *mctx, char **s); char **s);
static void unload(dns_zone_t *zone); static void unload(dns_zone_t *zone);
static void expire(dns_zone_t *zone); static void expire(dns_zone_t *zone);
static isc_result_t replacedb(dns_zone_t *zone, dns_db_t *db, static isc_result_t replacedb(dns_zone_t *zone, dns_db_t *db,
@ -220,6 +208,18 @@ static isc_result_t default_journal(dns_zone_t *zone);
static void releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone); static void releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);
static void xfrin_start_temporary_kludge(dns_zone_t *zone); static void xfrin_start_temporary_kludge(dns_zone_t *zone);
static void xfrdone(dns_zone_t *zone, isc_result_t result); static void xfrdone(dns_zone_t *zone, isc_result_t result);
#ifdef notyet
static void refresh_callback(isc_task_t *, isc_event_t *);
static void soa_query(dns_zone_t *, isc_taskaction_t);
static void checkservers_callback(isc_task_t *task, isc_event_t *event);
static void zone_shutdown(isc_task_t *, isc_event_t *);
static int message_count(dns_message_t *msg, dns_section_t section,
dns_rdatatype_t type);
static void add_address_tocheck(dns_message_t *msg,
dns_zone_checkservers_t *checkservers,
dns_rdatatype_t type);
static void record_serial(void);
#endif
@ -1058,7 +1058,7 @@ cmp_soa(dns_message_t *msg, dns_zone_t *zone, char *server) {
return; return;
result = dns_rdataset_next(&zonerdataset); result = dns_rdataset_next(&zonerdataset);
if (DNS_R_NOMORE != result) { if (DNS_R_NOMORE != result) {
zone_log(zone, me, ISC_LOG_INFO, "More that one SOA in zone"); zone_log(zone, me, ISC_LOG_INFO, "More than one SOA in zone");
goto cleanup_msgsoa; goto cleanup_msgsoa;
} }
dns_rdataset_disassociate(&zonerdataset); dns_rdataset_disassociate(&zonerdataset);
@ -1099,6 +1099,7 @@ cmp_soa(dns_message_t *msg, dns_zone_t *zone, char *server) {
} }
#endif #endif
#ifdef notyet
static void static void
add_address_tocheck(dns_message_t *msg, dns_zone_checkservers_t *checkservers, add_address_tocheck(dns_message_t *msg, dns_zone_checkservers_t *checkservers,
dns_rdatatype_t type) dns_rdatatype_t type)
@ -1142,6 +1143,7 @@ add_address_tocheck(dns_message_t *msg, dns_zone_checkservers_t *checkservers,
result = dns_rdataset_next(rdataset); result = dns_rdataset_next(rdataset);
} }
} }
#endif
void void
dns_zone_checkparents(dns_zone_t *zone) { dns_zone_checkparents(dns_zone_t *zone) {
@ -1766,6 +1768,7 @@ dns_zone_unmount(dns_zone_t *zone) {
/*XXX MPA*/ /*XXX MPA*/
} }
#ifdef notyet
/* /*
* For reference only. Use dns_zonemanager_managezone() instead. * For reference only. Use dns_zonemanager_managezone() instead.
*/ */
@ -1823,6 +1826,7 @@ dns_zone_manage(dns_zone_t *zone, isc_taskmgr_t *tmgr) {
return (DNS_R_SUCCESS); return (DNS_R_SUCCESS);
#endif #endif
} }
#endif
void void
dns_zone_setrefresh(dns_zone_t *zone, isc_uint32_t refresh, dns_zone_setrefresh(dns_zone_t *zone, isc_uint32_t refresh,
@ -1935,12 +1939,9 @@ dns_zone_notify(dns_zone_t *zone) {
*** Private *** Private
***/ ***/
#ifdef notyet
static void static void
refresh_callback(isc_task_t *task, isc_event_t *event) { refresh_callback(isc_task_t *task, isc_event_t *event) {
#if 1
(void)task;
(void)event;
#else
dns_fetchevent_t *devent = (dns_fetchevent_t *)event; dns_fetchevent_t *devent = (dns_fetchevent_t *)event;
dns_zone_t *zone; dns_zone_t *zone;
dns_message_t *msg = NULL; dns_message_t *msg = NULL;
@ -2099,8 +2100,8 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
soa_query(zone, refresh_callback); soa_query(zone, refresh_callback);
return; return;
#endif
} }
#endif
#ifdef notyet #ifdef notyet
static void static void
@ -2122,6 +2123,7 @@ soa_query(dns_zone_t *zone, isc_taskaction_t callback) {
} }
#endif #endif
#ifdef notyet
static void static void
zone_shutdown(isc_task_t *task, isc_event_t *event) { zone_shutdown(isc_task_t *task, isc_event_t *event) {
dns_zone_t *zone = (dns_zone_t *)event->arg; dns_zone_t *zone = (dns_zone_t *)event->arg;
@ -2129,6 +2131,7 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) {
task = task; /* XXX */ task = task; /* XXX */
zone = zone; /* XXX */ zone = zone; /* XXX */
} }
#endif
static void static void
zone_timer(isc_task_t *task, isc_event_t *event) { zone_timer(isc_task_t *task, isc_event_t *event) {
@ -2191,13 +2194,15 @@ zone_settimer(dns_zone_t *zone, isc_stdtime_t now) {
} }
if (next == 0) { if (next == 0) {
zone_log(zone, me, ISC_LOG_INFO, "settimer inactive"); zone_log(zone, me, ISC_LOG_DEBUG(10),
"settimer inactive");
result = isc_timer_reset(zone->timer, isc_timertype_inactive, result = isc_timer_reset(zone->timer, isc_timertype_inactive,
NULL, NULL, ISC_TRUE); NULL, NULL, ISC_TRUE);
} else { } else {
if (next <= now) if (next <= now)
next = now + 1; next = now + 1;
zone_log(zone, me, ISC_LOG_INFO, "settimer %d %d = %d seconds", zone_log(zone, me, ISC_LOG_DEBUG(10),
"settimer %d %d = %d seconds",
next, now, next - now); next, now, next - now);
isc_time_settoepoch(&expires); isc_time_settoepoch(&expires);
isc_interval_set(&interval, next - now, 0); isc_interval_set(&interval, next - now, 0);
@ -2596,6 +2601,7 @@ zone_log(dns_zone_t *zone, const char *me, int level,
level, "%s: zone %.*s: %s", me, len, namebuf, message); level, "%s: zone %.*s: %s", me, len, namebuf, message);
} }
#ifdef notyet
static int static int
message_count(dns_message_t *msg, dns_section_t section, dns_rdatatype_t type) { message_count(dns_message_t *msg, dns_section_t section, dns_rdatatype_t type) {
isc_result_t result; isc_result_t result;
@ -2618,6 +2624,7 @@ message_count(dns_message_t *msg, dns_section_t section, dns_rdatatype_t type) {
return (res); return (res);
} }
#endif
void void
dns_zone_setresolver(dns_zone_t *zone, dns_resolver_t *resolver) { dns_zone_setresolver(dns_zone_t *zone, dns_resolver_t *resolver) {
@ -2734,9 +2741,11 @@ dns_zone_getidleout(dns_zone_t *zone) {
return (zone->idleout); return (zone->idleout);
} }
#ifdef notyet
static void static void
record_serial() { record_serial() {
} }
#endif
isc_boolean_t isc_boolean_t
dns_zone_equal(dns_zone_t *oldzone, dns_zone_t *newzone) { dns_zone_equal(dns_zone_t *oldzone, dns_zone_t *newzone) {