diff options
author | Neal H. Walfield <[email protected]> | 2016-08-30 13:37:45 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2016-08-30 14:06:40 +0000 |
commit | 371ae66e9d5c7524431773c4a479fcae1ea3b652 (patch) | |
tree | feee07534e809ded6fdf158c6bcbd3c63aee055a /g10/gpg.h | |
parent | g10: Improve TOFU debugging output and some comments. (diff) | |
download | gnupg-371ae66e9d5c7524431773c4a479fcae1ea3b652.tar.gz gnupg-371ae66e9d5c7524431773c4a479fcae1ea3b652.zip |
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 <[email protected]>
Diffstat (limited to 'g10/gpg.h')
-rw-r--r-- | g10/gpg.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -83,7 +83,7 @@ struct server_control_s struct { tofu_dbs_t dbs; int in_transaction; - int batch_update_ref; + int batch_updated_wanted; time_t batch_update_started; } tofu; |