From a1014b72b0340a071f4c59c153b02c538bfd6b9f Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Fri, 17 Nov 2000 01:06:37 +0000 Subject: [PATCH] the static initializer wasn't always called. --- lib/dns/db.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dns/db.c b/lib/dns/db.c index 1d21f7d36b..0f123d3671 100644 --- a/lib/dns/db.c +++ b/lib/dns/db.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: db.c,v 1.62 2000/11/16 22:33:43 bwelling Exp $ */ +/* $Id: db.c,v 1.63 2000/11/17 01:06:37 bwelling Exp $ */ /*** *** Imports @@ -737,6 +737,8 @@ dns_db_register(const char *name, dns_dbcreatefunc_t create, void *driverarg, REQUIRE(name != NULL); REQUIRE(dbimp != NULL && *dbimp == NULL); + RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS); + RWLOCK(&implock, isc_rwlocktype_write); imp = impfind(name); if (imp != NULL) { @@ -770,6 +772,8 @@ dns_db_unregister(dns_dbimplementation_t **dbimp) { REQUIRE(dbimp != NULL && *dbimp != NULL); + RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS); + imp = *dbimp; RWLOCK(&implock, isc_rwlocktype_write); ISC_LIST_UNLINK(implementations, imp, link);