From a42365befc91b673c478d9a8520a49b9fd7d724b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 12 Jun 2006 21:29:21 +0000 Subject: r16172: Translate the ldb error codes into appropriate messages for the transaction cases. Andrew Bartlett (This used to be commit 28883f719304ee438c54a4d33e6bf1239f8c4094) --- source4/lib/ldb/common/ldb.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index 857c995a0e..1022f422c0 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -214,7 +214,9 @@ static int ldb_transaction_start_internal(struct ldb_context *ldb) if (ldb->err_string == NULL) { /* no error string was setup by the backend */ ldb_set_errstring(ldb, - talloc_asprintf(ldb, "ldb transaction start error %d", status)); + talloc_asprintf(ldb, "ldb transaction start: %s (%d)", + ldb_strerror(status), + status)); } } return status; @@ -236,7 +238,9 @@ static int ldb_transaction_commit_internal(struct ldb_context *ldb) if (ldb->err_string == NULL) { /* no error string was setup by the backend */ ldb_set_errstring(ldb, - talloc_asprintf(ldb, "ldb transaction commit error %d", status)); + talloc_asprintf(ldb, "ldb transaction commit: %s (%d)", + ldb_strerror(status), + status)); } } return status; @@ -256,7 +260,9 @@ static int ldb_transaction_cancel_internal(struct ldb_context *ldb) if (ldb->err_string == NULL) { /* no error string was setup by the backend */ ldb_set_errstring(ldb, - talloc_asprintf(ldb, "ldb transaction cancel error %d", status)); + talloc_asprintf(ldb, "ldb transaction cancel: %s (%d)", + ldb_strerror(status), + status)); } } return status; -- cgit