diff options
author | Neal H. Walfield <neal@g10code.com> | 2016-08-29 15:13:45 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@g10code.com> | 2016-08-30 15:54:41 +0200 |
commit | 33e97813d72996d22a295773c64261f5588ce9dd (patch) | |
tree | 59c4bc3d646c18bfa0810878b009d0f9e917b9f0 /g10/gpg.h | |
parent | g10: Print the info text in more situations. (diff) | |
download | gnupg2-33e97813d72996d22a295773c64261f5588ce9dd.tar.xz gnupg2-33e97813d72996d22a295773c64261f5588ce9dd.zip |
g10: Support nested transactions on the TOFU DB.
* g10/gpg.h (struct server_control_s): New field in_transaction.
* g10/tofu.c (struct tofu_dbs_s): Remove fields savepoint_inner and
savepoint_inner_commit.
(begin_transaction): Increment CTRL->TOFU.IN_TRANSACTION. Name the
savepoint according to the nesting level.
(end_transaction): Name the savepoint according to the nesting level.
Decrement CTRL->TOFU.IN_TRANSACTION.
(rollback_transaction): Likewise. Only ever rollback a non-batch
transaction.
(opendbs): Assert that there are no outstanding transactions.
--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
Diffstat (limited to 'g10/gpg.h')
-rw-r--r-- | g10/gpg.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -82,6 +82,7 @@ struct server_control_s /* Local data for tofu.c */ struct { tofu_dbs_t dbs; + int in_transaction; int batch_update_ref; time_t batch_update_started; } tofu; |