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/ldbedit.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/ldbedit.c')
-rw-r--r-- | source4/lib/ldb/tools/ldbedit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c index b2a040cd09..b18aea1b10 100644 --- a/source4/lib/ldb/tools/ldbedit.c +++ b/source4/lib/ldb/tools/ldbedit.c @@ -112,6 +112,11 @@ static int merge_edits(struct ldb_context *ldb, int ret = 0; int adds=0, modifies=0, deletes=0; + if (ldb_transaction_start(ldb) != 0) { + fprintf(stderr, "Failed to start transaction\n"); + return -1; + } + /* do the adds and modifies */ for (i=0;i<count2;i++) { msg = msg_find(ldb, msgs1, count1, msgs2[i]->dn); @@ -150,6 +155,11 @@ static int merge_edits(struct ldb_context *ldb, } } + if (ldb_transaction_commit(ldb) != 0) { + fprintf(stderr, "Failed to commit transaction\n"); + return -1; + } + printf("# %d adds %d modifies %d deletes\n", adds, modifies, deletes); return ret; |