diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-09-22 03:56:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:41 -0500 |
commit | ede8415d61b6791114c65de1c283a4e8c11f1585 (patch) | |
tree | f57fed9af4459d650db40546527ba230382a3248 /source4/lib/tdb/common/dump.c | |
parent | d6de10b409329084075c59d9371695871c738362 (diff) | |
download | samba-ede8415d61b6791114c65de1c283a4e8c11f1585.tar.gz samba-ede8415d61b6791114c65de1c283a4e8c11f1585.tar.bz2 samba-ede8415d61b6791114c65de1c283a4e8c11f1585.zip |
r10405: added transactions into tdb, and hook them into ldb. See my
samba-technical posting for more details on the transactions design.
This also adds a number of command line arguments to tdbtorture,
making it more flexible, and fixes some lock deadlock conditions in
the tdbtorture code.
(This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
Diffstat (limited to 'source4/lib/tdb/common/dump.c')
-rw-r--r-- | source4/lib/tdb/common/dump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/tdb/common/dump.c b/source4/lib/tdb/common/dump.c index 0e203cc0d8..577f23aac6 100644 --- a/source4/lib/tdb/common/dump.c +++ b/source4/lib/tdb/common/dump.c @@ -33,7 +33,8 @@ static tdb_off_t tdb_dump_record(struct tdb_context *tdb, tdb_off_t offset) struct list_struct rec; tdb_off_t tailer_ofs, tailer; - if (tdb_read(tdb, offset, (char *)&rec, sizeof(rec), DOCONV()) == -1) { + if (tdb->methods->tdb_read(tdb, offset, (char *)&rec, + sizeof(rec), DOCONV()) == -1) { printf("ERROR: failed to read record at %u\n", offset); return 0; } @@ -107,7 +108,8 @@ int tdb_printfreelist(struct tdb_context *tdb) printf("freelist top=[0x%08x]\n", rec_ptr ); while (rec_ptr) { - if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec), DOCONV()) == -1) { + if (tdb->methods->tdb_read(tdb, rec_ptr, (char *)&rec, + sizeof(rec), DOCONV()) == -1) { tdb_unlock(tdb, -1, F_WRLCK); return -1; } |