diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:54:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:54:13 +0930 |
commit | e6cbc0f00ec9ecb4c014ee484746d565382d5f67 (patch) | |
tree | f6ae2355ebe45421ae623ee439a10d60c3f5ceaa /lib/tdb2/tdb.c | |
parent | 10606b7e3bdad19a60953dbad9e1d541a1a3b805 (diff) | |
download | samba-e6cbc0f00ec9ecb4c014ee484746d565382d5f67.tar.gz samba-e6cbc0f00ec9ecb4c014ee484746d565382d5f67.tar.bz2 samba-e6cbc0f00ec9ecb4c014ee484746d565382d5f67.zip |
tdb2: unify tdb1_store into tdb_store
Switch on the TDB_VERSION1 flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 2bba2a856a6cfdb93085b701557850bc1da99587)
Diffstat (limited to 'lib/tdb2/tdb.c')
-rw-r--r-- | lib/tdb2/tdb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tdb2/tdb.c b/lib/tdb2/tdb.c index 28d0e03f7d..ac327284ef 100644 --- a/lib/tdb2/tdb.c +++ b/lib/tdb2/tdb.c @@ -286,6 +286,10 @@ bool tdb_exists(struct tdb_context *tdb, TDB_DATA key) struct tdb_used_record rec; struct hash_info h; + if (tdb->flags & TDB_VERSION1) { + return tdb1_exists(tdb, key); + } + off = find_and_lock(tdb, key, F_RDLCK, &h, &rec, NULL); if (TDB_OFF_IS_ERR(off)) { tdb->last_error = off; |