diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-06-12 21:29:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:09:04 -0500 |
commit | a42365befc91b673c478d9a8520a49b9fd7d724b (patch) | |
tree | 8d080f7a032fbcb0501703217b30dabeb22c946f /source4/lib/ldb | |
parent | b617c831a42681c59ea7ce17ab0f69f7b1fe26f7 (diff) | |
download | samba-a42365befc91b673c478d9a8520a49b9fd7d724b.tar.gz samba-a42365befc91b673c478d9a8520a49b9fd7d724b.tar.bz2 samba-a42365befc91b673c478d9a8520a49b9fd7d724b.zip |
r16172: Translate the ldb error codes into appropriate messages for the
transaction cases.
Andrew Bartlett
(This used to be commit 28883f719304ee438c54a4d33e6bf1239f8c4094)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; |