diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-12-16 16:23:10 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-12-16 16:23:10 +1100 |
commit | 5f20d219c39311126108ba74d8072814ecabc8fe (patch) | |
tree | 69c82c9e841a3cc130770a30fc08dd1d78992926 /source4/lib/ldb/tools/ldbadd.c | |
parent | 9057c2522adf8d17a07fd3c747d7fed06a523af6 (diff) | |
parent | 4380a374c1dec46ad77939604e548f0c79d9e2ec (diff) | |
download | samba-5f20d219c39311126108ba74d8072814ecabc8fe.tar.gz samba-5f20d219c39311126108ba74d8072814ecabc8fe.tar.bz2 samba-5f20d219c39311126108ba74d8072814ecabc8fe.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel
Diffstat (limited to 'source4/lib/ldb/tools/ldbadd.c')
-rw-r--r-- | source4/lib/ldb/tools/ldbadd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c index 15376e7342..3749aec629 100644 --- a/source4/lib/ldb/tools/ldbadd.c +++ b/source4/lib/ldb/tools/ldbadd.c @@ -92,6 +92,11 @@ int main(int argc, const char **argv) options = ldb_cmdline_process(ldb, argc, argv, usage); + if (ldb_transaction_start(ldb) != 0) { + printf("Failed to start transaction\n"); + exit(1); + } + if (options->argc == 0) { ret = process_file(ldb, stdin, &count); } else { @@ -108,6 +113,11 @@ int main(int argc, const char **argv) } } + if (count != 0 && ldb_transaction_commit(ldb) != 0) { + printf("Failed to commit transaction\n"); + exit(1); + } + talloc_free(ldb); printf("Added %d records with %d failures\n", count, failures); |