mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
configuration locking checkpoint
This commit is contained in:
@@ -77,6 +77,14 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup_name;
|
||||
}
|
||||
result = isc_rwlock_init(&view->conflock, UINT_MAX, UINT_MAX);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_rwlock_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup_mutex;
|
||||
}
|
||||
view->zonetable = NULL;
|
||||
result = dns_zt_create(mctx, rdclass, &view->zonetable);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@@ -84,7 +92,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
||||
"dns_zt_create() failed: %s",
|
||||
isc_result_totext(result));
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup_mutex;
|
||||
goto cleanup_rwlock;
|
||||
}
|
||||
view->secroots = NULL;
|
||||
result = dns_rbt_create(mctx, NULL, NULL, &view->secroots);
|
||||
@@ -128,6 +136,9 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
||||
cleanup_zt:
|
||||
dns_zt_detach(&view->zonetable);
|
||||
|
||||
cleanup_rwlock:
|
||||
isc_rwlock_destroy(&view->conflock);
|
||||
|
||||
cleanup_mutex:
|
||||
isc_mutex_destroy(&view->lock);
|
||||
|
||||
|
Reference in New Issue
Block a user