summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-09-22 04:16:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:41 -0500
commitd78ea3e34abd30fb388c4cc39e12611e211416a6 (patch)
tree4c111134a0850a7cd11283df50afd9484df8c8f3 /source4/lib/ldb/ldb_tdb/ldb_tdb.c
parentede8415d61b6791114c65de1c283a4e8c11f1585 (diff)
downloadsamba-d78ea3e34abd30fb388c4cc39e12611e211416a6.tar.gz
samba-d78ea3e34abd30fb388c4cc39e12611e211416a6.tar.bz2
samba-d78ea3e34abd30fb388c4cc39e12611e211416a6.zip
r10406: added --nosync option to all ldb tools, so that you can control if
transactions are synchronous or not on the command line. add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary ldb databases non-synchronous (This used to be commit dba41164e0c52f1e4351bd9057b16661cee3a822)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index c056bd2e2d..a2faaa805f 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -895,11 +895,10 @@ int ltdb_connect(struct ldb_context *ldb, const char *url,
tdb_flags = TDB_DEFAULT;
-#if 0
- /* set this to run tdb without disk sync, but still with
- transactions */
- tdb_flags |= TDB_NOSYNC;
-#endif
+ /* check for the 'nosync' option */
+ if (flags & LDB_FLG_NOSYNC) {
+ tdb_flags |= TDB_NOSYNC;
+ }
if (flags & LDB_FLG_RDONLY) {
open_flags = O_RDONLY;