X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb.c;fp=ccan%2Ftdb2%2Ftdb.c;h=f02844e7c6fff6cdf00a760a1ce62f1cd803a1a4;hb=08c05da588018c6b76834e57b66d525546643708;hp=a7aa4572382b0f8b10ef03c4adc08599fd7e7293;hpb=98c754ffe65bc335f66161d6cc8705d4ea2710ec;p=ccan diff --git a/ccan/tdb2/tdb.c b/ccan/tdb2/tdb.c index a7aa4572..f02844e7 100644 --- a/ccan/tdb2/tdb.c +++ b/ccan/tdb2/tdb.c @@ -248,6 +248,9 @@ enum TDB_ERROR tdb_fetch(struct tdb_context *tdb, struct tdb_data key, struct hash_info h; enum TDB_ERROR ecode; + if (tdb->flags & TDB_VERSION1) + return tdb1_fetch(tdb, key, data); + off = find_and_lock(tdb, key, F_RDLCK, &h, &rec, NULL); if (TDB_OFF_IS_ERR(off)) { return tdb->last_error = off;