mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Handle databases with no update methods
Non qp/rbt databases might not implement the dns_db_(begin|commit|abort)update methods. This commit ensures that we return ISC_R_NOTIMPLEMENTED in those cases.
This commit is contained in:
parent
97f2816947
commit
1ae892f54d
2 changed files with 4 additions and 3 deletions
|
|
@ -603,7 +603,8 @@ isc_result_t
|
|||
dns_db_abortupdate(dns_db_t *db, dns_rdatacallbacks_t *callbacks);
|
||||
/*%<
|
||||
* Abort the update to 'db'. Must be safe to double-call or call after
|
||||
* dns_db_commitupdate.
|
||||
* dns_db_commitupdate. Must also be safe to call without having called
|
||||
* dns_db_beginupdate first.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ ixfr_apply_one(dns_xfrin_t *xfr, ixfr_apply_data_t *data) {
|
|||
* So we need to commit *before* calling dns_zone_verifydb, and rely
|
||||
* on closeversion to actually do cleanup.
|
||||
*/
|
||||
dns_db_commitupdate(xfr->db, &callbacks);
|
||||
CHECK(dns_db_commitupdate(xfr->db, &callbacks));
|
||||
|
||||
CHECK(dns_zone_verifydb(xfr->zone, xfr->db, xfr->ver));
|
||||
|
||||
|
|
@ -550,7 +550,7 @@ cleanup:
|
|||
* For the reason stated above, dns_db_abortupdate must *commit* the
|
||||
* changes and rely on closeversion to clean them up.
|
||||
*/
|
||||
dns_db_abortupdate(xfr->db, &callbacks);
|
||||
(void)dns_db_abortupdate(xfr->db, &callbacks);
|
||||
|
||||
/* We need to end the transaction, but keep the previous error */
|
||||
(void)ixfr_end_transaction(&xfr->ixfr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue