summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-04-22 11:04:03 +0200
committerMartin Nagy <mnagy@redhat.com>2009-04-22 14:01:09 +0200
commit1c5e11063e71024f08c087ebc8bbddf7044b831e (patch)
tree6406dd6a9ff557008eeb035e77b0fafe21294643 /lib
parent1ae7a3c4d2f018b251838ffdbd926c758cc2329c (diff)
downloadbind_dynamic-1c5e11063e71024f08c087ebc8bbddf7044b831e.tar.gz
bind_dynamic-1c5e11063e71024f08c087ebc8bbddf7044b831e.tar.xz
bind_dynamic-1c5e11063e71024f08c087ebc8bbddf7044b831e.zip
Unload all back-ends before reloading.
Diffstat (limited to 'lib')
-rw-r--r--lib/dns/dynamic_db.c5
-rw-r--r--lib/dns/include/dns/dynamic_db.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/dns/dynamic_db.c b/lib/dns/dynamic_db.c
index f11584d..5dc9644 100644
--- a/lib/dns/dynamic_db.c
+++ b/lib/dns/dynamic_db.c
@@ -226,7 +226,7 @@ cleanup:
}
void
-dns_dynamic_db_cleanup(void)
+dns_dynamic_db_cleanup(isc_boolean_t exiting)
{
dyndb_implementation_t *elem;
dyndb_implementation_t *next;
@@ -244,7 +244,8 @@ dns_dynamic_db_cleanup(void)
}
UNLOCK(&dyndb_lock);
- isc_mutex_destroy(&dyndb_lock);
+ if (exiting == ISC_TRUE)
+ isc_mutex_destroy(&dyndb_lock);
}
dns_dyndb_arguments_t *
diff --git a/lib/dns/include/dns/dynamic_db.h b/lib/dns/include/dns/dynamic_db.h
index 12f7a06..7b1c1ce 100644
--- a/lib/dns/include/dns/dynamic_db.h
+++ b/lib/dns/include/dns/dynamic_db.h
@@ -32,7 +32,7 @@ isc_result_t dns_dynamic_db_load(const char *libname, const char *name,
isc_mem_t *mctx, const char * const *argv,
dns_dyndb_arguments_t *dyndb_args);
-void dns_dynamic_db_cleanup(void);
+void dns_dynamic_db_cleanup(isc_boolean_t exiting);
dns_dyndb_arguments_t *dns_dyndb_arguments_create(isc_mem_t *mctx);
void dns_dyndb_arguments_destroy(isc_mem_t *mctx, dns_dyndb_arguments_t *args);