X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_db4.c;h=0163ed53ea5bfdfb9cfb72c6e8a0b50d0cf7d6ca;hb=d7c1eb353d72c8c1955a7dfb842227a18149cb98;hp=0d7b46b935de0dd422b7e4cea340aada5b726be1;hpb=c8d06ad9146d939718dec9ee01b39e4e7012ef23;p=onak.git 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 ; }