lib/tdb_wrap: use tdb directly, not tdb_compat.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 19 Jun 2012 03:13:10 +0000 (12:43 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 19 Jun 2012 03:38:07 +0000 (05:38 +0200)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb_wrap/tdb_wrap.c
lib/tdb_wrap/tdb_wrap.h
lib/tdb_wrap/wscript_build
source3/lib/messages_local.c
source4/cluster/local.c
source4/ntvfs/posix/posix_eadb.c

index 1540aa90332a64aa23ef078552dd8f86b3ca2088..b96469d7350c72bc0920ad54d4096aa2dbb7903d 100644 (file)
@@ -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 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) {
 
        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);
        }
 
                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;
        }
        if (result->tdb == NULL) {
                goto fail;
        }
index 81e77e76a45fc5b2fd23b59309324fd51d40c57a..3e1fb83734b3dbb009f0d7c99d4cfe2c53f69c3c 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef _TDB_WRAP_H_
 #define _TDB_WRAP_H_
 
 #ifndef _TDB_WRAP_H_
 #define _TDB_WRAP_H_
 
-#include "tdb_compat.h"
+#include "tdb.h"
 
 struct tdb_wrap {
        struct tdb_context *tdb;
 
 struct tdb_wrap {
        struct tdb_context *tdb;
index 0811bc5a2dbdeb05ee033c431a8e957b23060bd3..0e5532fbc3a226491405f132d7c364efae377f7b 100644 (file)
@@ -2,7 +2,7 @@
 
 bld.SAMBA_LIBRARY('tdb-wrap',
                   source='tdb_wrap.c',
 
 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
                  )
                   private_library=True,
                   local_include=False
                  )
index e20024ae5987dcf8ed8fd9078606f17080844ce2..74b6a13764c03ee83c89a4bcdf847a0626760799 100644 (file)
@@ -218,7 +218,7 @@ static NTSTATUS messaging_tdb_fetch(TDB_CONTEXT *msg_tdb,
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
-       data = tdb_fetch_compat(msg_tdb, key);
+       data = tdb_fetch(msg_tdb, key);
 
        if (data.dptr == NULL) {
                *presult = result;
 
        if (data.dptr == NULL) {
                *presult = result;
index df67bcfa799741180ba9aa36a93e3b816eb59e2d..0e59321f64f68f9edc1e6ca0edaa71152d1f04f6 100644 (file)
@@ -22,7 +22,6 @@
 #include "includes.h"
 #include "cluster/cluster.h"
 #include "cluster/cluster_private.h"
 #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"
 #include "lib/tdb_wrap/tdb_wrap.h"
 #include "system/filesys.h"
 #include "param/param.h"
index 3f5a5b8e309e591068f640568474448e71980112..31c565c9c710ef3413ca27591af0b0a43647d347 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "includes.h"
 #include "lib/tdb_wrap/tdb_wrap.h"
 
 #include "includes.h"
 #include "lib/tdb_wrap/tdb_wrap.h"
-#include "tdb_compat.h"
 #include "vfs_posix.h"
 #include "posix_eadb.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;
        }
 
                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;
        }
        if (tdata.dptr == NULL) {
                return NT_STATUS_NOT_FOUND;
        }