summaryrefslogtreecommitdiff
path: root/bin/named/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/named/main.c')
-rw-r--r--bin/named/main.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/bin/named/main.c b/bin/named/main.c
index 84d86b14..d2261136 100644
--- a/bin/named/main.c
+++ b/bin/named/main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: main.c,v 1.180 2010-12-22 03:59:02 marka Exp $ */
+/* $Id: main.c,v 1.180.14.3 2011-03-11 06:47:00 marka Exp $ */
/*! \file */
@@ -51,6 +51,8 @@
#include <dst/result.h>
+#include <dlz/dlz_dlopen_driver.h>
+
/*
* Defining NS_MAIN provides storage declarations (rather than extern)
* for variables in named/globals.h.
@@ -81,10 +83,10 @@
*/
/* #include "xxdb.h" */
+#ifdef CONTRIB_DLZ
/*
- * Include DLZ drivers if appropriate.
+ * Include contributed DLZ drivers if appropriate.
*/
-#ifdef DLZ
#include <dlz/dlz_drivers.h>
#endif
@@ -560,6 +562,7 @@ parse_command_line(int argc, char *argv[]) {
argc -= isc_commandline_index;
argv += isc_commandline_index;
+ POST(argv);
if (argc > 0) {
usage();
@@ -856,9 +859,19 @@ setup(void) {
*/
/* xxdb_init(); */
-#ifdef DLZ
+#ifdef ISC_DLZ_DLOPEN
+ /*
+ * Register the DLZ "dlopen" driver.
+ */
+ result = dlz_dlopen_init(ns_g_mctx);
+ if (result != ISC_R_SUCCESS)
+ ns_main_earlyfatal("dlz_dlopen_init() failed: %s",
+ isc_result_totext(result));
+#endif
+
+#if CONTRIB_DLZ
/*
- * Register any DLZ drivers.
+ * Register any other contributed DLZ drivers.
*/
result = dlz_drivers_init();
if (result != ISC_R_SUCCESS)
@@ -882,12 +895,18 @@ cleanup(void) {
*/
/* xxdb_clear(); */
-#ifdef DLZ
+#ifdef CONTRIB_DLZ
/*
- * Unregister any DLZ drivers.
+ * Unregister contributed DLZ drivers.
*/
dlz_drivers_clear();
#endif
+#ifdef ISC_DLZ_DLOPEN
+ /*
+ * Unregister "dlopen" DLZ driver.
+ */
+ dlz_dlopen_clear();
+#endif
dns_name_destroy();