use update_recordsandbytes in rbt_datafixer
This commit is contained in:
committed by
Ondřej Surý
parent
0cda448248
commit
7d4d64340e
@@ -7082,12 +7082,6 @@ rbt_datafixer(dns_rbtnode_t *rbtnode, void *base, size_t filesize,
|
||||
for (header = rbtnode->data; header != NULL; header = header->next) {
|
||||
unsigned char *p = (unsigned char *) header;
|
||||
size_t size = dns_rdataslab_size(p, sizeof(*header));
|
||||
unsigned int count = dns_rdataslab_count(p, sizeof(*header));;
|
||||
RWLOCK(&rbtdb->current_version->rwlock, isc_rwlocktype_write);
|
||||
rbtdb->current_version->records += count;
|
||||
rbtdb->current_version->bytes += size;
|
||||
RWUNLOCK(&rbtdb->current_version->rwlock,
|
||||
isc_rwlocktype_write);
|
||||
isc_crc64_update(crc, p, size);
|
||||
#ifdef DEBUG
|
||||
hexdump("hashing header", p, sizeof(rdatasetheader_t));
|
||||
@@ -7119,6 +7113,7 @@ rbt_datafixer(dns_rbtnode_t *rbtnode, void *base, size_t filesize,
|
||||
(header->next > (rdatasetheader_t *) limit))
|
||||
return (ISC_R_INVALIDFILE);
|
||||
}
|
||||
update_recordsandbytes(true, rbtdb->current_version, header);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user