]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - keydb.c
Switch debian build system to dh
[onak.git] / keydb.c
diff --git a/keydb.c b/keydb.c
index 00bb3ff815e2216f8042934cdced6747c59642f5..c257eb589db31b1c51962049c0e79a3384969dfe 100644 (file)
--- a/keydb.c
+++ b/keydb.c
@@ -162,7 +162,7 @@ uint64_t generic_getfullkeyid(uint64_t keyid)
        if (keyid < 0x100000000LL) {
                config.dbbackend->fetch_key(keyid, &publickey, false);
                if (publickey != NULL) {
-                       keyid = get_keyid(publickey);
+                       get_keyid(publickey, &keyid);
                        free_publickey(publickey);
                        publickey = NULL;
                } else {
@@ -193,13 +193,15 @@ int generic_update_keys(struct openpgp_publickey **keys, bool sendsync)
        struct openpgp_publickey *prev = NULL;
        int newkeys = 0;
        bool intrans;
+       uint64_t keyid;
 
        for (curkey = *keys; curkey != NULL; curkey = curkey->next) {
                intrans = config.dbbackend->starttrans();
+               get_keyid(curkey, &keyid);
                logthing(LOGTHING_INFO,
                        "Fetching key 0x%" PRIX64 ", result: %d",
-                       get_keyid(curkey),
-                       config.dbbackend->fetch_key(get_keyid(curkey), &oldkey,
+                       keyid,
+                       config.dbbackend->fetch_key(keyid, &oldkey,
                                        intrans));
 
                /*