X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_db4.c;h=7f8e498b3d20897a4d2b0c609ac6285a9b6a62e7;hb=a57a146ebc3f15f1ba2dfe8ecb9b59702fb8f799;hp=0d7b46b935de0dd422b7e4cea340aada5b726be1;hpb=01ee2eab14a664ed2d72228f6f9bae6841b47726;p=onak.git diff --git a/keydb_db4.c b/keydb_db4.c index 0d7b46b..7f8e498 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 ; } @@ -1032,4 +1032,5 @@ uint64_t getfullkeyid(uint64_t keyid) */ #define NEED_GETKEYSIGS 1 #define NEED_KEYID2UID 1 +#define NEED_UPDATEKEYS 1 #include "keydb.c"