mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-03 05:50:39 -05:00
in rdbdb.c:setsigningtime stop breaking heap invariant property unless we are going to restore the invariant property
(cherry picked from commit 6ead410268)
This commit is contained in:
parent
2a44ffeed8
commit
889cc681eb
1 changed files with 10 additions and 2 deletions
|
|
@ -7694,8 +7694,16 @@ setsigningtime(dns_db_t *db, dns_rdataset_t *rdataset, isc_stdtime_t resign) {
|
|||
isc_rwlocktype_write);
|
||||
|
||||
oldheader = *header;
|
||||
header->resign = (isc_stdtime_t)(dns_time64_from32(resign) >> 1);
|
||||
header->resign_lsb = resign & 0x1;
|
||||
/*
|
||||
* Only break the heap invariant (by adjusting resign and resign_lsb)
|
||||
* if we are going to be restoring it by calling isc_heap_increased
|
||||
* or isc_heap_decreased.
|
||||
*/
|
||||
if (resign != 0) {
|
||||
header->resign =
|
||||
(isc_stdtime_t)(dns_time64_from32(resign) >> 1);
|
||||
header->resign_lsb = resign & 0x1;
|
||||
}
|
||||
if (header->heap_index != 0) {
|
||||
INSIST(RESIGN(header));
|
||||
if (resign == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue