summaryrefslogtreecommitdiff
path: root/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ldb')
-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