Home GnuPG
Diffusion GnuPG 7f65e84ac035

gpg: Provide an interface to patch TOFU updates.
7f65e84ac035Unpublished

Unpublished Commit ยท Learn More

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

Description

gpg: Provide an interface to patch TOFU updates.

* g10/tofu.c (struct db): Rename begin_transaction to savepoint_batch.
Rename end_transaction to savepoint_batch_commit.  Update users.
Remove field rollback.  Add fields savepoint_inner and
savepoint_inner_commit.  Add field batch_update.
(dump_cache): New function.
(batch_update): New variable.
(begin_transaction). New function.
(end_transaction): New function.
(rollback_transaction): New function.
(tofu_begin_batch_update): New function.
(tofu_end_batch_update): New function.
(closedb): End any pending batch transaction.
(closedbs): Assert that none of the DBs have a started batch
transaction if we not in batch mode.
(record_binding): Use the begin_transaction, end_transaction and
rollback_transaction functions instead of including the SQL inline.
Also start a batch mode transaction if we are using the flat format.
(tofu_register): Use the begin_transaction, end_transaction and
rollback_transaction functions instead of including the SQL inline.
* g10/gpgv.c (tofu_begin_batch_update): New function.
(tofu_end_batch_update): New function.
* g10/test-stubs.c (tofu_begin_batch_update): New function.
(tofu_end_batch_update): New function.
  • Signed-off-by: Neal H. Walfield <neal@g10code.com>

Details

Provenance
Neal H. Walfield <neal@g10code.com>Authored on Oct 23 2015, 5:23 PM
Parents
rG297cf8660ce3: gpg: Cache prepared SQL queries and open DB connections.
Branches
Unknown
Tags
Unknown

Event Timeline

Neal H. Walfield <neal@g10code.com> committed rG7f65e84ac035: gpg: Provide an interface to patch TOFU updates. (authored by Neal H. Walfield <neal@g10code.com>).Oct 23 2015, 5:38 PM