mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-20 02:28:53 -04:00
grab a write lock before updating header->trust
This commit is contained in:
parent
fc69c74e60
commit
0810b14604
1 changed files with 7 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbtdb.c,v 1.270.12.18 2010/02/25 10:56:40 tbox Exp $ */
|
||||
/* $Id: rbtdb.c,v 1.270.12.19 2010/02/26 00:25:27 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -7413,10 +7413,16 @@ rdataset_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
|||
|
||||
static void
|
||||
rdataset_settrust(dns_rdataset_t *rdataset, dns_trust_t trust) {
|
||||
dns_rbtdb_t *rbtdb = rdataset->private1;
|
||||
dns_rbtnode_t *rbtnode = rdataset->private2;
|
||||
rdatasetheader_t *header = rdataset->private3;
|
||||
|
||||
header--;
|
||||
NODE_LOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
|
||||
isc_rwlocktype_write);
|
||||
header->trust = rdataset->trust = trust;
|
||||
NODE_UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
|
||||
isc_rwlocktype_write);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue