summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 18:40:32 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:35 +0200
commit4823262439bc6c1ce9fcce97ed472ad44e85cb77 (patch)
treee7ec18964e9790d52f0c6d14cd1ff63d421dfc72 /source4
parenta4993f647cfc5b8e0cf4405cc1d8815770837310 (diff)
downloadsamba-4823262439bc6c1ce9fcce97ed472ad44e85cb77.tar.gz
samba-4823262439bc6c1ce9fcce97ed472ad44e85cb77.tar.bz2
samba-4823262439bc6c1ce9fcce97ed472ad44e85cb77.zip
tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.
These don't exist in tdb2. The former is used in one weird place in tdb1, and the latter not at all. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 6033f84ef3..0d4be49123 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -68,9 +68,13 @@ 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;