From 316e5e376c793d1f9882eebddbbd855cf121cce4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 19 Jun 2012 12:43:10 +0930 Subject: [PATCH] lib/tdb_wrap: use tdb directly, not tdb_compat. Signed-off-by: Rusty Russell --- lib/tdb_wrap/tdb_wrap.c | 6 ++++-- lib/tdb_wrap/tdb_wrap.h | 2 +- lib/tdb_wrap/wscript_build | 2 +- source3/lib/messages_local.c | 2 +- source4/cluster/local.c | 1 - source4/ntvfs/posix/posix_eadb.c | 3 +-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/tdb_wrap/tdb_wrap.c b/lib/tdb_wrap/tdb_wrap.c index 1540aa90332..b96469d7350 100644 --- a/lib/tdb_wrap/tdb_wrap.c +++ b/lib/tdb_wrap/tdb_wrap.c @@ -91,6 +91,7 @@ static struct tdb_wrap_private *tdb_wrap_private_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { struct tdb_wrap_private *result; + struct tdb_logging_context lctx; result = talloc(mem_ctx, struct tdb_wrap_private); if (result == NULL) { @@ -117,8 +118,9 @@ static struct tdb_wrap_private *tdb_wrap_private_open(TALLOC_CTX *mem_ctx, hash_size = lpcfg_parm_int(lp_ctx, NULL, "tdb_hashsize", base, 0); } - result->tdb = tdb_open_compat(name, hash_size, tdb_flags, - open_flags, mode, tdb_wrap_log, NULL); + lctx.log_fn = tdb_wrap_log; + result->tdb = tdb_open_ex(name, hash_size, tdb_flags, + open_flags, mode, &lctx, NULL); if (result->tdb == NULL) { goto fail; } diff --git a/lib/tdb_wrap/tdb_wrap.h b/lib/tdb_wrap/tdb_wrap.h index 81e77e76a45..3e1fb83734b 100644 --- a/lib/tdb_wrap/tdb_wrap.h +++ b/lib/tdb_wrap/tdb_wrap.h @@ -29,7 +29,7 @@ #ifndef _TDB_WRAP_H_ #define _TDB_WRAP_H_ -#include "tdb_compat.h" +#include "tdb.h" struct tdb_wrap { struct tdb_context *tdb; diff --git a/lib/tdb_wrap/wscript_build b/lib/tdb_wrap/wscript_build index 0811bc5a2db..0e5532fbc3a 100644 --- a/lib/tdb_wrap/wscript_build +++ b/lib/tdb_wrap/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA_LIBRARY('tdb-wrap', source='tdb_wrap.c', - deps='tdb_compat talloc samba-util samba-hostconfig', + deps='tdb talloc samba-util samba-hostconfig', private_library=True, local_include=False ) diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c index e20024ae598..74b6a13764c 100644 --- a/source3/lib/messages_local.c +++ b/source3/lib/messages_local.c @@ -218,7 +218,7 @@ static NTSTATUS messaging_tdb_fetch(TDB_CONTEXT *msg_tdb, return NT_STATUS_NO_MEMORY; } - data = tdb_fetch_compat(msg_tdb, key); + data = tdb_fetch(msg_tdb, key); if (data.dptr == NULL) { *presult = result; diff --git a/source4/cluster/local.c b/source4/cluster/local.c index df67bcfa799..0e59321f64f 100644 --- a/source4/cluster/local.c +++ b/source4/cluster/local.c @@ -22,7 +22,6 @@ #include "includes.h" #include "cluster/cluster.h" #include "cluster/cluster_private.h" -#include "tdb_compat.h" #include "lib/tdb_wrap/tdb_wrap.h" #include "system/filesys.h" #include "param/param.h" diff --git a/source4/ntvfs/posix/posix_eadb.c b/source4/ntvfs/posix/posix_eadb.c index 3f5a5b8e309..31c565c9c71 100644 --- a/source4/ntvfs/posix/posix_eadb.c +++ b/source4/ntvfs/posix/posix_eadb.c @@ -21,7 +21,6 @@ #include "includes.h" #include "lib/tdb_wrap/tdb_wrap.h" -#include "tdb_compat.h" #include "vfs_posix.h" #include "posix_eadb.h" @@ -130,7 +129,7 @@ NTSTATUS pull_xattr_blob_tdb_raw(struct tdb_wrap *ea_tdb, return status; } - tdata = tdb_fetch_compat(ea_tdb->tdb, tkey); + tdata = tdb_fetch(ea_tdb->tdb, tkey); if (tdata.dptr == NULL) { return NT_STATUS_NOT_FOUND; } -- 2.34.1