From df4a6e82280845668dee6fe10f2025c9fa2b958c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 19 Jun 2012 12:43:10 +0930 Subject: ldb: use tdb directly, not tdb_compat. Signed-off-by: Rusty Russell --- lib/ldb/ldb_tdb/ldb_tdb_wrap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/ldb/ldb_tdb/ldb_tdb_wrap.c') diff --git a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c index 014a756d6e..eb168098a7 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c +++ b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c @@ -99,6 +99,7 @@ struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx, struct ldb_context *ldb) { struct ltdb_wrap *w; + struct tdb_logging_context lctx; struct stat st; if (stat(path, &st) == 0) { @@ -117,7 +118,10 @@ struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx, return NULL; } - w->tdb = tdb_open_compat(path, hash_size, tdb_flags, open_flags, mode, ltdb_log_fn, ldb); + lctx.log_fn = ltdb_log_fn; + lctx.log_private = ldb; + w->tdb = tdb_open_ex(path, hash_size, tdb_flags, open_flags, mode, + &lctx, NULL); if (w->tdb == NULL) { talloc_free(w); return NULL; -- cgit