summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelly Yeoh <kyeoh@au1.ibm.com>2012-01-25 14:58:44 +1100
committerAndrew Tridgell <tridge@samba.org>2012-01-25 07:06:40 +0100
commit34e7d960d0065a51b5524630a6699834c9b362b1 (patch)
treee34f4e182f23163f8acab004542e9e35fdb8bcc7
parentab5cdb31e98396fabce1e6f9d7fafe91d5a839d8 (diff)
downloadsamba-34e7d960d0065a51b5524630a6699834c9b362b1.tar.gz
samba-34e7d960d0065a51b5524630a6699834c9b362b1.tar.bz2
samba-34e7d960d0065a51b5524630a6699834c9b362b1.zip
ldbedit: prevent a transaction warning on failure
if a modify fails then cancel the transaction to prevent a dangling transaction error Signed-off-by: Andrew Tridgell <tridge@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Jan 25 07:06:40 CET 2012 on sn-devel-104
-rw-r--r--lib/ldb/tools/ldbedit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ldb/tools/ldbedit.c b/lib/ldb/tools/ldbedit.c
index aaf6d80352..cf4ab3f8ec 100644
--- a/lib/ldb/tools/ldbedit.c
+++ b/lib/ldb/tools/ldbedit.c
@@ -152,6 +152,7 @@ static int merge_edits(struct ldb_context *ldb,
if (ret != -1) {
modifies += (unsigned int) ret;
} else {
+ ldb_transaction_cancel(ldb);
return -1;
}
}