summaryrefslogtreecommitdiff
path: root/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-18 22:30:04 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-19 05:38:05 +0200
commit6244f668a34279e6da62213333dfb32c3ccdb17d (patch)
tree0dd495f4d03e57e8a5710d2edea84c137d4b4aee /lib/ldb/ldb_tdb
parent5bad913938daca4ae3020653690701db83826954 (diff)
downloadsamba-6244f668a34279e6da62213333dfb32c3ccdb17d.tar.gz
samba-6244f668a34279e6da62213333dfb32c3ccdb17d.tar.bz2
samba-6244f668a34279e6da62213333dfb32c3ccdb17d.zip
TDB2: make SAMBA use tdb1 again for the moment.
Otherwise the following surgery will break the SAMBA build and testsuite. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ldb/ldb_tdb')
-rw-r--r--lib/ldb/ldb_tdb/ldb_tdb.c4
-rw-r--r--lib/ldb/ldb_tdb/ldb_tdb_wrap.c27
2 files changed, 0 insertions, 31 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index 5324c9b76f..3541f9109f 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -74,13 +74,9 @@ int ltdb_err_map(enum TDB_ERROR tdb_code)
case TDB_ERR_IO:
return LDB_ERR_PROTOCOL_ERROR;
case TDB_ERR_LOCK:
-#ifndef BUILD_TDB2
case TDB_ERR_NOLOCK:
-#endif
return LDB_ERR_BUSY;
-#ifndef BUILD_TDB2
case TDB_ERR_LOCK_TIMEOUT:
-#endif
return LDB_ERR_TIME_LIMIT_EXCEEDED;
case TDB_ERR_EXISTS:
return LDB_ERR_ENTRY_ALREADY_EXISTS;
diff --git a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
index 3ddcba5cea..014a756d6e 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb_wrap.c
@@ -24,32 +24,6 @@
#include "ldb_tdb.h"
#include "dlinklist.h"
-/* FIXME: TDB2 does this internally, so no need to wrap multiple opens! */
-#if BUILD_TDB2
-static void ltdb_log_fn(struct tdb_context *tdb,
- enum tdb_log_level level,
- enum TDB_ERROR ecode,
- const char *message,
- struct ldb_context *ldb)
-{
- enum ldb_debug_level ldb_level;
- const char *name = tdb_name(tdb);
-
- switch (level) {
- case TDB_LOG_WARNING:
- ldb_level = LDB_DEBUG_WARNING;
- case TDB_LOG_USE_ERROR:
- case TDB_LOG_ERROR:
- ldb_level = LDB_DEBUG_FATAL;
- break;
- default:
- ldb_level = LDB_DEBUG_FATAL;
- }
-
- ldb_debug(ldb, ldb_level, "ltdb: tdb(%s): %s: %s", name,
- tdb_errorstr(ecode), message);
-}
-#else /* !TDB2 */
static void ltdb_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
static void ltdb_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...)
{
@@ -86,7 +60,6 @@ static void ltdb_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, con
ldb_debug(ldb, ldb_level, "ltdb: tdb(%s): %s", name, message);
talloc_free(message);
}
-#endif
/*
the purpose of this code is to work around the braindead posix locking