]> the.earth.li Git - onak.git/commitdiff
Fix deletion of 64 bit keys in DB4 backend
authorJonathan McDowell <noodles@earth.li>
Thu, 14 Nov 2013 05:39:14 +0000 (21:39 -0800)
committerJonathan McDowell <noodles@earth.li>
Thu, 14 Nov 2013 05:39:51 +0000 (21:39 -0800)
We were using the cursor from the id32db instead of the one for the
id64db.

keydb_db4.c

index 288e467b6246f270aa22a3d60e79965f476395d3..3e4a039e1cc0058a5512ecf17a37654fdbab4335 100644 (file)
@@ -1032,13 +1032,13 @@ static int db4_delete_key(struct onak_dbctx *dbctx,
                        data.data = fingerprint.fp;
                        data.size = fingerprint.length;
 
-                       ret = cursor->c_get(cursor,
+                       ret = cursor64->c_get(cursor64,
                                &key,
                                &data,
                                DB_GET_BOTH);
 
                        if (ret == 0) {
-                               ret = cursor->c_del(cursor, 0);
+                               ret = cursor64->c_del(cursor64, 0);
                        }
 
                        if (ret != 0 && ret != DB_NOTFOUND) {