X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb1_transaction.c;fp=ccan%2Ftdb2%2Ftdb1_transaction.c;h=51aa2e11b00b38066f38afbc3e8b89b35c9e9f4b;hp=165fd7f972f5b74dd0d1de0271c97ec9e502ebbe;hb=8a47d50d72ea62e378dc92b150c92c1317c73fa3;hpb=919937354a331bb964564a11b5a5b80403ff8db9 diff --git a/ccan/tdb2/tdb1_transaction.c b/ccan/tdb2/tdb1_transaction.c index 165fd7f9..51aa2e11 100644 --- a/ccan/tdb2/tdb1_transaction.c +++ b/ccan/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");