s4-repl: Try to give more information in the error codes for prepare_commit failure.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 29 May 2018 04:50:16 +0000 (16:50 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 May 2018 02:23:26 +0000 (04:23 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/dsdb/repl/replicated_objects.c

index 4c8890f055305255a44c3d89be70416a1a5957ef..24bf8f4c2360d331c44bd3dd752733f8cf247f2d 100644 (file)
@@ -935,8 +935,9 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb,
                } else if (cur_schema ) {
                        dsdb_reference_schema(ldb, cur_schema, SCHEMA_MEMORY_ONLY);
                }
-               DEBUG(0,(__location__ " Failed to prepare commit of transaction: %s\n",
-                        ldb_errstring(ldb)));
+               DBG_ERR(" Failed to prepare commit of transaction: %s (%s)\n",
+                       ldb_errstring(ldb),
+                       ldb_strerror(ret));
                TALLOC_FREE(tmp_ctx);
                return WERR_FOOBAR;
        }