diff options
author | Volker Lendecke <vl@samba.org> | 2012-12-11 21:04:58 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-12-21 11:54:33 +0100 |
commit | 2c3fd8a13e7dde23a23404cd88078a04c8b338ea (patch) | |
tree | 3e1b56268cb8f67306b367efc6a07351f6e01b31 /lib/tdb/common | |
parent | 2148d86c7a2facd6e128b753aef98722843af3e1 (diff) | |
download | samba-2c3fd8a13e7dde23a23404cd88078a04c8b338ea.tar.gz samba-2c3fd8a13e7dde23a23404cd88078a04c8b338ea.tar.xz samba-2c3fd8a13e7dde23a23404cd88078a04c8b338ea.zip |
tdb: Fix a missing CONVERT
methods->tdb_write expects data in on-disk format. For reading that
record, methods->tdb_read() has taken care of the on-disk to in-memory
representation according to the DOCONV() flag passed down. tdb_rec_write()
is a wrapper around methods->tdb_write just doing the CONVERT() on the
way to disk.
Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/tdb/common')
-rw-r--r-- | 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 6358f64a04..5312c2a978 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; } |