diff options
Diffstat (limited to 'contrib/bind9/bin/named/main.c')
-rw-r--r-- | contrib/bind9/bin/named/main.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/contrib/bind9/bin/named/main.c b/contrib/bind9/bin/named/main.c index 960de2a..6b9b67e 100644 --- a/contrib/bind9/bin/named/main.c +++ b/contrib/bind9/bin/named/main.c @@ -15,7 +15,9 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: main.c,v 1.119.2.3.2.25 2006/11/10 18:51:06 marka Exp $ */ +/* $Id: main.c,v 1.136.18.17 2006/11/10 18:51:14 marka Exp $ */ + +/*! \file */ #include <config.h> @@ -71,6 +73,13 @@ */ /* #include "xxdb.h" */ +/* + * Include DLZ drivers if appropriate. + */ +#ifdef DLZ +#include <dlz/dlz_drivers.h> +#endif + static isc_boolean_t want_stats = ISC_FALSE; static char program_name[ISC_DIR_NAMEMAX] = "named"; static char absolute_conffile[ISC_DIR_PATHMAX]; @@ -226,7 +235,7 @@ lwresd_usage(void) { " [-f|-g] [-n number_of_cpus] [-p port] " "[-P listen-port] [-s]\n" " [-t chrootdir] [-u username] [-i pidfile]\n" - " [-m {usage|trace|record}]\n"); + " [-m {usage|trace|record|size|mctx}]\n"); } static void @@ -239,7 +248,7 @@ usage(void) { "usage: named [-4|-6] [-c conffile] [-d debuglevel] " "[-f|-g] [-n number_of_cpus]\n" " [-p port] [-s] [-t chrootdir] [-u username]\n" - " [-m {usage|trace|record}]\n"); + " [-m {usage|trace|record|size|mctx}]\n"); } static void @@ -307,6 +316,8 @@ static struct flag_def { { "trace", ISC_MEM_DEBUGTRACE }, { "record", ISC_MEM_DEBUGRECORD }, { "usage", ISC_MEM_DEBUGUSAGE }, + { "size", ISC_MEM_DEBUGSIZE }, + { "mctx", ISC_MEM_DEBUGCTX }, { NULL, 0 } }; @@ -671,6 +682,16 @@ setup(void) { */ /* xxdb_init(); */ +#ifdef DLZ + /* + * Registyer any DLZ drivers. + */ + result = dlz_drivers_init(); + if (result != ISC_R_SUCCESS) + ns_main_earlyfatal("dlz_drivers_init() failed: %s", + isc_result_totext(result)); +#endif + ns_server_create(ns_g_mctx, &ns_g_server); } @@ -687,6 +708,15 @@ cleanup(void) { */ /* xxdb_clear(); */ +#ifdef DLZ + /* + * Unregister any DLZ drivers. + */ + dlz_drivers_clear(); +#endif + + dns_name_destroy(); + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ISC_LOG_NOTICE, "exiting"); ns_log_shutdown(); @@ -882,6 +912,7 @@ main(int argc, char *argv[]) { } } isc_mem_destroy(&ns_g_mctx); + isc_mem_checkdestroyed(stderr); ns_main_setmemstats(NULL); |