From 014ca657e600ee2b3b4dc9d2ef482d050cd0917d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:57:13 +0930 Subject: tdb2: unify tdb1_parse_record into tdb_parse_record Switch on the TDB_VERSION1 flag. Signed-off-by: Rusty Russell (Imported from CCAN commit 3352e4e947777d4a90a2dd4f3037e1e494231b25) --- lib/tdb2/tdb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/tdb2/tdb.c') 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; -- cgit