summaryrefslogtreecommitdiff
path: root/lib/tdb2/test
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:42:13 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:42:13 +0930
commit997592431f3e62cacef13d9b75a12a3d8058e7b7 (patch)
treea0941636f9ad0c72fc5a774b7031bbb8a3f3e4fd /lib/tdb2/test
parentf7e84f8ef86c3323f70e2fa30fd8a49cab1febf9 (diff)
downloadsamba-997592431f3e62cacef13d9b75a12a3d8058e7b7.tar.gz
samba-997592431f3e62cacef13d9b75a12a3d8058e7b7.tar.bz2
samba-997592431f3e62cacef13d9b75a12a3d8058e7b7.zip
tdb2: use tdb->flags & TDB_RDONLY instead of tdb->read_only for TDB1 code.
There's also a semantic change here: for tdb1, being read-only meant no locking, and it was an error to try to lock a r/o database. For TDB2, you'd need to specify TDB_NOLOCK, which suppresses locking silently. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 4dc29a338fadeac805b369b4b0851c02f1b152c7)
Diffstat (limited to 'lib/tdb2/test')
-rw-r--r--lib/tdb2/test/run-tdb1-3G-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb2/test/run-tdb1-3G-file.c b/lib/tdb2/test/run-tdb1-3G-file.c
index cf3db23321..fcb1a0c757 100644
--- a/lib/tdb2/test/run-tdb1-3G-file.c
+++ b/lib/tdb2/test/run-tdb1-3G-file.c
@@ -10,7 +10,7 @@ static int tdb1_expand_file_sparse(struct tdb1_context *tdb,
tdb1_off_t size,
tdb1_off_t addition)
{
- if (tdb->read_only || tdb->traverse_read) {
+ if ((tdb->flags & TDB_RDONLY) || tdb->traverse_read) {
tdb->last_error = TDB_ERR_RDONLY;
return -1;
}