X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb.c;h=a3897831068dd99f5d0d67a12824d4a5cba6397b;hp=5e92af8c9666ac4c443af53638fb1c822229179c;hb=3352e4e947777d4a90a2dd4f3037e1e494231b25;hpb=2bba2a856a6cfdb93085b701557850bc1da99587 diff --git a/ccan/tdb2/tdb.c b/ccan/tdb2/tdb.c index 5e92af8c..a3897831 100644 --- a/ccan/tdb2/tdb.c +++ b/ccan/tdb2/tdb.c @@ -526,6 +526,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;