summaryrefslogtreecommitdiffstats
path: root/g10/gpg.h
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@g10code.com>2016-08-29 15:13:45 +0200
committerNeal H. Walfield <neal@g10code.com>2016-08-30 15:54:41 +0200
commit33e97813d72996d22a295773c64261f5588ce9dd (patch)
tree59c4bc3d646c18bfa0810878b009d0f9e917b9f0 /g10/gpg.h
parentg10: Print the info text in more situations. (diff)
downloadgnupg2-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/g10/gpg.h b/g10/gpg.h
index 1aaff2f4f..154da0de4 100644
--- a/g10/gpg.h
+++ b/g10/gpg.h
@@ -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;