mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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>
This commit is contained in:
parent
4c2abb221b
commit
33e97813d7
2 changed files with 22 additions and 20 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue