From b64782a7c058516198899a3cd8c5a50d30e08220 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 28 Sep 2000 00:24:28 +0000 Subject: [PATCH] Clean up logging... need to hand run idl_delete to find bug --- servers/slapd/back-bdb/delete.c | 7 ++++--- servers/slapd/back-bdb/dn2id.c | 6 +++--- servers/slapd/back-bdb/idl.c | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-bdb/delete.c b/servers/slapd/back-bdb/delete.c index 2c9bf2af0c..01e636f6e9 100644 --- a/servers/slapd/back-bdb/delete.c +++ b/servers/slapd/back-bdb/delete.c @@ -33,11 +33,12 @@ bdb_delete( DB_TXN *ltid = NULL; struct bdb_op_info opinfo; - Debug(LDAP_DEBUG_ARGS, "==> bdb_delete: %s\n", dn, 0, 0); + Debug( LDAP_DEBUG_ARGS, "==> bdb_delete: %s\n", dn, 0, 0 ); if (0) { - /* transaction retry */ -retry: rc = txn_abort( ltid ); +retry: /* transaction retry */ + Debug( LDAP_DEBUG_TRACE, "==> bdb_delete: retrying...\n", 0, 0, 0 ); + rc = txn_abort( ltid ); ltid = NULL; op->o_private = NULL; if( rc != 0 ) { diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index 671e8197cf..af380ed06b 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -213,7 +213,7 @@ bdb_dn2id( rc = db->get( db, txn, &key, &data, 0 ); Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: id=0x%08lx: %s (%d)\n", - id, db_strerror( rc ), rc ); + *id, db_strerror( rc ), rc ); ch_free( key.data ); return rc; @@ -336,9 +336,9 @@ bdb_dn2id_children( rc = db->get( db, txn, &key, &data, 0 ); - Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_children( %s ): %s (%d)\n", + Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_children( %s ): %schildren (%d)\n", dn, - rc == 0 ? "yes" : ( rc == DB_NOTFOUND ? "no" : + rc == 0 ? "" : ( rc == DB_NOTFOUND ? "no " : db_strerror(rc) ), rc ); return rc; diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index acb67d6c52..fddb62d235 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -107,7 +107,7 @@ static int idl_delete( ID *ids, ID id ) if( x <= 0 ) { /* internal error */ - return -1; + return -2; } if( x > ids[0] || ids[x] != id ) { @@ -116,7 +116,7 @@ static int idl_delete( ID *ids, ID id ) } else if ( --ids[0] == 0 ) { if( x != 1 ) { - return -1; + return -3; } } else { @@ -268,7 +268,7 @@ bdb_idl_delete_key( if( rc != 0 ) { Debug( LDAP_DEBUG_ANY, - "=> bdb_idl_insert_key: idl_insert failed (%d)\n", + "=> bdb_idl_delete_key: idl_delete failed (%d)\n", rc, 0, 0 ); return rc; } -- 2.39.5