Author: abartlet
Date: 2006-06-12 21:29:21 +0000 (Mon, 12 Jun 2006)
New Revision: 16172

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16172

Log:
Translate the ldb error codes into appropriate messages for the
transaction cases.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c      2006-06-12 20:26:01 UTC 
(rev 16171)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c      2006-06-12 21:29:21 UTC 
(rev 16172)
@@ -214,7 +214,9 @@
                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 @@
                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 @@
                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;

Reply via email to