tdb patch

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Dec 12 02:31:27 MST 2012


Hi!

While browsing through tdb code I found a place that might
deserve a patch. I do not have a test for this, but to me it
seems that one of our error recovery pieces needs a CONVERT
when it does not have it right now.

Comments?

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 64d544f70dd8fcc31d059024d1eb9340fa55c237 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 11 Dec 2012 21:04:58 +0100
Subject: [PATCH] tdb: Fix a missing CONVERT

---
 lib/tdb/common/freelist.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/tdb/common/freelist.c b/lib/tdb/common/freelist.c
index 6358f64..5312c2a 100644
--- a/lib/tdb/common/freelist.c
+++ b/lib/tdb/common/freelist.c
@@ -45,7 +45,7 @@ int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct tdb_record
 		TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_rec_free_read non-free magic 0x%x at offset=%d - fixing\n", 
 			 rec->magic, off));
 		rec->magic = TDB_FREE_MAGIC;
-		if (tdb->methods->tdb_write(tdb, off, rec, sizeof(*rec)) == -1)
+		if (tdb_rec_write(tdb, off, rec) == -1)
 			return -1;
 	}
 
-- 
1.7.3.4



More information about the samba-technical mailing list