Home GnuPG
Diffusion GnuPG 371ae66e9d5c

g10: Improve TOFU batch update code.
371ae66e9d5cUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

g10: Improve TOFU batch update code.

* g10/gpg.h (tofu): Rename field batch_update_ref to
batch_updated_wanted.
* g10/tofu.c (struct tofu_dbs_s): Rename field batch_update to
in_batch_transaction.
(begin_transaction): Only end an extant batch transaction if we are
not in a normal transaction.  When ending a batch transaction, really
end it.  Update ctrl->tofu.batch_update_started when starting a batch
transaction.
(end_transaction): Only release a batch transaction if ONLY_BATCH is
true.  When releasing a batch transaction, assert that there is no
open normal transaction.  Only allow DBS to be NULL if ONLY_BATCH is
true.
(tofu_begin_batch_update): Don't update
ctrl->tofu.batch_update_started.
(opendbs): Call end_transaction unconditionally.
  • Signed-off-by: Neal H. Walfield <neal@g10code.com>

Details

Provenance
Neal H. Walfield <neal@g10code.com>Authored on Aug 30 2016, 3:37 PM
Parents
rG3beeaa70bdbd: g10: Improve TOFU debugging output and some comments.
Branches
Unknown
Tags
Unknown

Event Timeline

Neal H. Walfield <neal@g10code.com> committed rG371ae66e9d5c: g10: Improve TOFU batch update code. (authored by Neal H. Walfield <neal@g10code.com>).Aug 30 2016, 4:06 PM