[Volker.Lendecke at SerNet.DE: tdb patch]

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Dec 14 08:25:48 MST 2012


Hi, Rusty and others interested in tdbQ

https://git.samba.org/?p=vl/samba.git/.git;a=shortlog;h=refs/heads/tdb

holds this patch together with a few other cleanup patches
to tdb. The "tdb: Fix a missing CONVERT" is the only one
that is a real bugfix (I think), the rest is cosmetic
patches and refactorings for (IMHO) easier to understand
code.

Comments?

Volker

----- Forwarded message from Volker Lendecke <Volker.Lendecke at SerNet.DE> -----

Date: Wed, 12 Dec 2012 10:31:27 +0100
Date: Wed, 12 Dec 2012 10:31:27 +0100
From: Volker Lendecke <Volker.Lendecke at SerNet.DE>
To: samba-technical at samba.org
Subject: tdb patch

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

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



----- End forwarded message -----

-- 
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


More information about the samba-technical mailing list