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/tdb.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/tdb.c')
-rw-r--r-- | source4/lib/tdb/common/tdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c index f099c2d1aa..c37d37a4f2 100644 --- a/source4/lib/tdb/common/tdb.c +++ b/source4/lib/tdb/common/tdb.c @@ -98,7 +98,7 @@ static int tdb_update_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, TDB_ return -1; } - if (tdb_write(tdb, rec_ptr + sizeof(rec) + rec.key_len, + if (tdb->methods->tdb_write(tdb, rec_ptr + sizeof(rec) + rec.key_len, dbuf.dptr, dbuf.dsize) == -1) return -1; @@ -285,7 +285,7 @@ int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag) /* write out and point the top of the hash chain at it */ if (tdb_rec_write(tdb, rec_ptr, &rec) == -1 - || tdb_write(tdb, rec_ptr+sizeof(rec), p, key.dsize+dbuf.dsize)==-1 + || tdb->methods->tdb_write(tdb, rec_ptr+sizeof(rec), p, key.dsize+dbuf.dsize)==-1 || tdb_ofs_write(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1) { /* Need to tdb_unallocate() here */ goto fail; |