diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:35:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:35:13 +0930 |
commit | 9b98acbba304f2c1c1fba5bda672e1005151e526 (patch) | |
tree | 64dfb0b094bd57aa403a96be95097b6db9732553 /lib/tdb2/tdb1_tdb.c | |
parent | 61b1bd1dca145a0417907793579352c66b016c23 (diff) | |
download | samba-9b98acbba304f2c1c1fba5bda672e1005151e526.tar.gz samba-9b98acbba304f2c1c1fba5bda672e1005151e526.tar.bz2 samba-9b98acbba304f2c1c1fba5bda672e1005151e526.zip |
tdb2: Make TDB1 code use TDB2's open flags.
This means getting rid of TDB_VOLATILE (perhaps we should use an
attribute for that?), TDB_INCOMPATIBLE_HASH (use the
tdb_attribute_hash for that) and TDB_CLEAR_IF_FIRST (use the
tdb_attribute_openhook for that).
We also get rid of TDB_DISALLOW_NESTING: that's the default for TDB2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 22d0e0dc59fc9d7e0046fec6971ef478c2d604fd)
Diffstat (limited to 'lib/tdb2/tdb1_tdb.c')
-rw-r--r-- | lib/tdb2/tdb1_tdb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tdb2/tdb1_tdb.c b/lib/tdb2/tdb1_tdb.c index c9406c4b16..a1a0643835 100644 --- a/lib/tdb2/tdb1_tdb.c +++ b/lib/tdb2/tdb1_tdb.c @@ -31,13 +31,13 @@ TDB_DATA tdb1_null; /* non-blocking increment of the tdb sequence number if the tdb has been opened using - the TDB1_SEQNUM flag + the TDB_SEQNUM flag */ void tdb1_increment_seqnum_nonblock(struct tdb1_context *tdb) { tdb1_off_t seqnum=0; - if (!(tdb->flags & TDB1_SEQNUM)) { + if (!(tdb->flags & TDB_SEQNUM)) { return; } @@ -51,11 +51,11 @@ void tdb1_increment_seqnum_nonblock(struct tdb1_context *tdb) /* increment the tdb sequence number if the tdb has been opened using - the TDB1_SEQNUM flag + the TDB_SEQNUM flag */ static void tdb1_increment_seqnum(struct tdb1_context *tdb) { - if (!(tdb->flags & TDB1_SEQNUM)) { + if (!(tdb->flags & TDB_SEQNUM)) { return; } @@ -843,7 +843,7 @@ int tdb1_repack(struct tdb1_context *tdb) return -1; } - tmp_db = tdb1_open("tmpdb", tdb1_hash_size(tdb), TDB1_INTERNAL, O_RDWR|O_CREAT, 0); + tmp_db = tdb1_open("tmpdb", tdb1_hash_size(tdb), TDB_INTERNAL, O_RDWR|O_CREAT, 0); if (tmp_db == NULL) { tdb->last_error = tdb_logerr(tdb, TDB_ERR_OOM, TDB_LOG_ERROR, __location__ " Failed to create tmp_db"); |