From: Jonathan McDowell <noodles@earth.li>
Date: Thu, 14 Nov 2013 05:39:14 +0000 (-0800)
Subject: Fix deletion of 64 bit keys in DB4 backend
X-Git-Tag: onak-0.4.3~24
X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=b6390a543c22add446f24ca6e4a28d9c5b7f49e8;p=onak.git

Fix deletion of 64 bit keys in DB4 backend

We were using the cursor from the id32db instead of the one for the
id64db.
---

diff --git a/keydb_db4.c b/keydb_db4.c
index 288e467..3e4a039 100644
--- a/keydb_db4.c
+++ b/keydb_db4.c
@@ -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) {