summaryrefslogtreecommitdiff
path: root/lib/tdb2/tdb1_check.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:56:13 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:56:13 +0930
commit9140fca812063be69842a6c64030e32c65c9dff1 (patch)
tree73b9e12160be66ce7853e0e9b44ad44c17269b65 /lib/tdb2/tdb1_check.c
parent30294c7b91456dd49b89a9b26eb0b1066087815c (diff)
downloadsamba-9140fca812063be69842a6c64030e32c65c9dff1.tar.gz
samba-9140fca812063be69842a6c64030e32c65c9dff1.tar.bz2
samba-9140fca812063be69842a6c64030e32c65c9dff1.zip
tdb2: unify tdb1_chainlock et al. into tdb_chainlock
Switch on the TDB_VERSION1 flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit ceb2f3eacbad917ee990afbc3dd800bfb0607887)
Diffstat (limited to 'lib/tdb2/tdb1_check.c')
-rw-r--r--lib/tdb2/tdb1_check.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb2/tdb1_check.c b/lib/tdb2/tdb1_check.c
index 50e71d9783..c3c3c60f43 100644
--- a/lib/tdb2/tdb1_check.c
+++ b/lib/tdb2/tdb1_check.c
@@ -338,7 +338,7 @@ int tdb1_check(struct tdb_context *tdb,
if (tdb->file->allrecord_lock.count != 0) {
locked = false;
} else {
- if (tdb1_lockall_read(tdb) == -1)
+ if (tdb_lockall_read(tdb) != TDB_SUCCESS)
return -1;
locked = true;
}
@@ -455,7 +455,7 @@ int tdb1_check(struct tdb_context *tdb,
free(hashes);
if (locked) {
- tdb1_unlockall_read(tdb);
+ tdb_unlockall_read(tdb);
}
return 0;
@@ -463,7 +463,7 @@ free:
free(hashes);
unlock:
if (locked) {
- tdb1_unlockall_read(tdb);
+ tdb_unlockall_read(tdb);
}
return -1;
}