aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/frontend.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-09-24 14:38:21 +0000
committerWerner Koch <[email protected]>2020-09-24 14:38:21 +0000
commitc2b14f5d6852fb9efaca8aeec7961e9d036203e8 (patch)
tree615bb6204f18f68b1c13fa58d6cac20acda9a834 /kbx/frontend.c
parenttests: Integrate --use-keyboxd into the OpenPGP test suite. (diff)
downloadgnupg-c2b14f5d6852fb9efaca8aeec7961e9d036203e8.tar.gz
gnupg-c2b14f5d6852fb9efaca8aeec7961e9d036203e8.zip
keyboxd: New command TRANSACTION.
* kbx/backend-sqlite.c (be_sqlite_rollback): New. (be_sqlite_commit): New. (be_sqlite_search): Take care of global transactions. (be_sqlite_store): Ditto. (be_sqlite_delete): Ditto. * kbx/frontend.c (kbxd_rollback, kbxd_commit): New. * kbx/keyboxd.h (opt): Add vars for transactions. * kbx/kbxserver.c (struct server_local_s): Add fields next_session and client_pid. (session_list): New var. (cmd_transaction): New. (register_commands): Register command. (kbxd_start_command_handler): Store pids and track sessions. Do a final rollback. -- This command is currently an experiment to allow a client to run everything in one session. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/frontend.c')
-rw-r--r--kbx/frontend.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kbx/frontend.c b/kbx/frontend.c
index 48b6fffa2..c80c9fa8a 100644
--- a/kbx/frontend.c
+++ b/kbx/frontend.c
@@ -172,6 +172,21 @@ kbxd_release_session_info (ctrl_t ctrl)
}
+
+gpg_error_t
+kbxd_rollback (void)
+{
+ return be_sqlite_rollback ();
+}
+
+
+gpg_error_t
+kbxd_commit (void)
+{
+ return be_sqlite_commit ();
+}
+
+
/* Search for the keys described by (DESC,NDESC) and return them to
* the caller. If RESET is set, the search state is first reset.