diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:57:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:57:13 +0930 |
commit | 014ca657e600ee2b3b4dc9d2ef482d050cd0917d (patch) | |
tree | 8618af13d707f8e7d7a6ceb80db557421851c48c /lib/tdb2/tdb.c | |
parent | 9140fca812063be69842a6c64030e32c65c9dff1 (diff) | |
download | samba-014ca657e600ee2b3b4dc9d2ef482d050cd0917d.tar.gz samba-014ca657e600ee2b3b4dc9d2ef482d050cd0917d.tar.bz2 samba-014ca657e600ee2b3b4dc9d2ef482d050cd0917d.zip |
tdb2: unify tdb1_parse_record into tdb_parse_record
Switch on the TDB_VERSION1 flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 3352e4e947777d4a90a2dd4f3037e1e494231b25)
Diffstat (limited to 'lib/tdb2/tdb.c')
-rw-r--r-- | lib/tdb2/tdb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tdb2/tdb.c b/lib/tdb2/tdb.c index ac327284ef..787ee7bd50 100644 --- a/lib/tdb2/tdb.c +++ b/lib/tdb2/tdb.c @@ -528,6 +528,11 @@ enum TDB_ERROR tdb_parse_record_(struct tdb_context *tdb, struct hash_info h; enum TDB_ERROR ecode; + if (tdb->flags & TDB_VERSION1) { + return tdb->last_error = tdb1_parse_record(tdb, key, parse, + data); + } + off = find_and_lock(tdb, key, F_RDLCK, &h, &rec, NULL); if (TDB_OFF_IS_ERR(off)) { return tdb->last_error = off; |