From 77e2403f1314a28722f0fb21f6682320b2e9935d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 28 Aug 2009 19:26:53 +1000 Subject: [PATCH 1/1] s4:ldb Don't sleep(100) in this error case, but debug the LDIF --- source4/lib/ldb/ldb_tdb/ldb_index.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index 1daa4500f89..7db22de0978 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -1407,14 +1407,14 @@ int ltdb_index_del_value(struct ldb_module *module, const char *dn, i = ldb_msg_find_idx(msg, dn, &j, LTDB_IDX); if (i == -1) { struct ldb_ldif ldif; - - ldb_debug(ldb, LDB_DEBUG_ERROR, - "ERROR: dn %s not found in %s", dn, - ldb_dn_get_linearized(dn_key)); + char *ldif_string; ldif.changetype = LDB_CHANGETYPE_NONE; ldif.msg = msg; - ldb_ldif_write_file(ldb, stdout, &ldif); - sleep(100); + ldif_string = ldb_ldif_write_string(ldb, NULL, &ldif); + ldb_debug(ldb, LDB_DEBUG_ERROR, + "ERROR: dn %s not found in %s", dn, + ldif_string); + talloc_free(ldif_string); /* it ain't there. hmmm */ talloc_free(dn_key); return LDB_SUCCESS; -- 2.34.1