From: Kelly Yeoh Date: Wed, 25 Jan 2012 03:58:44 +0000 (+1100) Subject: ldbedit: prevent a transaction warning on failure X-Git-Tag: tevent-0.9.15~254 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34e7d960d0065a51b5524630a6699834c9b362b1;p=thirdparty%2Fsamba.git 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 Autobuild-User: Andrew Tridgell Autobuild-Date: Wed Jan 25 07:06:40 CET 2012 on sn-devel-104 --- diff --git a/lib/ldb/tools/ldbedit.c b/lib/ldb/tools/ldbedit.c index aaf6d80352d..cf4ab3f8ec1 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; } }