X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/01ee2eab14a664ed2d72228f6f9bae6841b47726..848a41ea337ecee39f3eaf9d091a316d07ec8e9d:/keydb_db4.c?ds=inline diff --git a/keydb_db4.c b/keydb_db4.c index 0d7b46b..0163ed5 100644 --- a/keydb_db4.c +++ b/keydb_db4.c @@ -638,10 +638,6 @@ int store_key(struct openpgp_publickey *publickey, bool intrans, bool update) uids = NULL; } - if (!intrans) { - endtrans(); - } - /* * Write the truncated 32 bit keyid so we can lookup the full id for * queries. @@ -704,6 +700,10 @@ int store_key(struct openpgp_publickey *publickey, bool intrans, bool update) } } + if (!intrans) { + endtrans(); + } + return deadlock ? -1 : 0 ; }