mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
lib/tdb_wrap: use tdb directly, not tdb_compat.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
df4a6e8228
commit
316e5e376c
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
)
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user