diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:33:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:33:13 +0930 |
commit | ebb3017cf08cc4dad3217db6cea404069b494b47 (patch) | |
tree | fd4ce2c81bc4d7f513aea07f02d289b5daa94f1a /lib/tdb2/tdb1_transaction.c | |
parent | e613effeae7c9373c9e635fc708ec2ce29661d4c (diff) | |
download | samba-ebb3017cf08cc4dad3217db6cea404069b494b47.tar.gz samba-ebb3017cf08cc4dad3217db6cea404069b494b47.tar.bz2 samba-ebb3017cf08cc4dad3217db6cea404069b494b47.zip |
tdb2: Make tdb1 share tdb_store flags, struct tdb_data and TDB_MAGIC_FOOD.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 8a47d50d72ea62e378dc92b150c92c1317c73fa3)
Diffstat (limited to 'lib/tdb2/tdb1_transaction.c')
-rw-r--r-- | lib/tdb2/tdb1_transaction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb2/tdb1_transaction.c b/lib/tdb2/tdb1_transaction.c index 165fd7f972..51aa2e11b0 100644 --- a/lib/tdb2/tdb1_transaction.c +++ b/lib/tdb2/tdb1_transaction.c @@ -478,7 +478,7 @@ static int _tdb1_transaction_start(struct tdb1_context *tdb) /* get the transaction write lock. This is a blocking lock. As discussed with Volker, there are a number of ways we could make this async, which we will probably do in the future */ - if (tdb1_transaction_lock(tdb, F_WRLCK, TDB1_LOCK_WAIT) == -1) { + if (tdb1_transaction_lock(tdb, F_WRLCK, TDB_LOCK_WAIT) == -1) { SAFE_FREE(tdb->transaction->blocks); SAFE_FREE(tdb->transaction); return -1; @@ -486,7 +486,7 @@ static int _tdb1_transaction_start(struct tdb1_context *tdb) /* get a read lock from the freelist to the end of file. This is upgraded to a write lock during the commit */ - if (tdb1_allrecord_lock(tdb, F_RDLCK, TDB1_LOCK_WAIT, true) == -1) { + if (tdb1_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_WAIT, true) == -1) { tdb_logerr(tdb, tdb->last_error, TDB_LOG_ERROR, "tdb1_transaction_start: failed to get hash locks"); goto fail_allrecord_lock; @@ -973,7 +973,7 @@ static int _tdb1_transaction_prepare_commit(struct tdb1_context *tdb) /* get the open lock - this prevents new users attaching to the database during the commit */ - if (tdb1_nest_lock(tdb, TDB1_OPEN_LOCK, F_WRLCK, TDB1_LOCK_WAIT) == -1) { + if (tdb1_nest_lock(tdb, TDB1_OPEN_LOCK, F_WRLCK, TDB_LOCK_WAIT) == -1) { tdb_logerr(tdb, tdb->last_error, TDB_LOG_ERROR, "tdb1_transaction_prepare_commit:" " failed to get open lock"); |