]> git.sur5r.net Git - openldap/commitdiff
Clean up logging... need to hand run idl_delete to find bug
authorKurt Zeilenga <kurt@openldap.org>
Thu, 28 Sep 2000 00:24:28 +0000 (00:24 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 28 Sep 2000 00:24:28 +0000 (00:24 +0000)
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/dn2id.c
servers/slapd/back-bdb/idl.c

index 2c9bf2af0c2960a2c9242bc722fab5d50e37e6a1..01e636f6e9ea4b3acaa2b1686621b20ea2d3b783 100644 (file)
@@ -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 ) {
index 671e8197cfbb34c6a4af211b4724a6a925b55057..af380ed06b9dfcb897861ecc1cac5ca1cd552272 100644 (file)
@@ -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;
index acb67d6c52e44222c4d05d31db99995e6f0a9939..fddb62d2354ba4ecd66857e5441c4cbeb4736262 100644 (file)
@@ -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;
                }