X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Ftools.c;h=1056944ebd255be7170b73275a5ca7b9c41ac04c;hb=23efa07a994c94c4e78a9495ac6e2981b87b4ba0;hp=6ed8ec343e42825f4efa37d96dba76d845277747;hpb=5f154f2e57ee61607eee0929865524c3d2f87d28;p=openldap diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 6ed8ec343e..1056944ebd 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -30,8 +30,6 @@ int bdb_tool_entry_open( int bdb_tool_entry_close( BackendDB *be ) { - struct bdb_info *bdb = (struct bdb_info *) be->be_private; - assert( be != NULL ); if( key.data ) { @@ -128,9 +126,8 @@ ID bdb_tool_entry_put( assert( text->bv_val[0] == '\0' ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ARGS, - "=> bdb_tool_entry_put( %ld, \"%s\" )\n", - (long) e->e_id, e->e_dn )); + LDAP_LOG ( TOOLS, ARGS, "=> bdb_tool_entry_put( %ld, \"%s\" )\n", + (long) e->e_id, e->e_dn, 0 ); #else Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_put( %ld, \"%s\" )\n", (long) e->e_id, e->e_dn, 0 ); @@ -143,8 +140,7 @@ ID bdb_tool_entry_put( "txn_begin failed: %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", @@ -159,8 +155,8 @@ ID bdb_tool_entry_put( "next_id failed: %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); @@ -180,8 +176,8 @@ ID bdb_tool_entry_put( "dn2id_add failed: %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); @@ -196,8 +192,8 @@ ID bdb_tool_entry_put( "id2entry_add failed: %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); @@ -211,8 +207,8 @@ ID bdb_tool_entry_put( "index_entry_add failed: %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); @@ -228,8 +224,8 @@ done: "txn_commit failed: %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", @@ -244,8 +240,8 @@ done: "txn_aborted! %s (%d)", db_strerror(rc), rc ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_put: %s\n", text->bv_val )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_put: %s\n", @@ -268,8 +264,8 @@ int bdb_tool_entry_reindex( struct berval pdn; #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ARGS, - "=> bdb_tool_entry_reindex( %ld )\n", (long) id )); + LDAP_LOG ( TOOLS, ARGS, + "=> bdb_tool_entry_reindex( %ld )\n", (long) id, 0, 0 ); #else Debug( LDAP_DEBUG_ARGS, "=> bdb_tool_entry_reindex( %ld )\n", (long) id, 0, 0 ); @@ -279,9 +275,9 @@ int bdb_tool_entry_reindex( if( e == NULL ) { #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_DETAIL1, + LDAP_LOG ( TOOLS, DETAIL1, "bdb_tool_entry_reindex:: could not locate id=%ld\n", - (long) id )); + (long) id, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, "bdb_tool_entry_reindex:: could not locate id=%ld\n", @@ -293,9 +289,9 @@ int bdb_tool_entry_reindex( rc = TXN_BEGIN( bi->bi_dbenv, NULL, &tid, bi->bi_db_opflags ); if( rc != 0 ) { #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, + LDAP_LOG ( TOOLS, ERR, "=> bdb_tool_entry_reindex: txn_begin failed: %s (%d)\n", - db_strerror(rc), rc )); + db_strerror(rc), rc, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_reindex: txn_begin failed: %s (%d)\n", @@ -312,9 +308,8 @@ int bdb_tool_entry_reindex( */ #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, - "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n", - (long) id, e->e_dn )); + LDAP_LOG ( TOOLS, ERR, + "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n", (long) id, e->e_dn, 0 ); #else Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n", (long) id, e->e_dn, 0 ); @@ -329,9 +324,9 @@ int bdb_tool_entry_reindex( rc = bdb_dn2id_add( be, tid, &pdn, e ); if( rc != 0 && rc != DB_KEYEXIST ) { #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, + LDAP_LOG ( TOOLS, ERR, "=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n", - db_strerror(rc), rc )); + db_strerror(rc), rc, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n", @@ -347,9 +342,9 @@ done: rc = TXN_COMMIT( tid, 0 ); if( rc != 0 ) { #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_ERR, + LDAP_LOG ( TOOLS, ERR, "=> bdb_tool_entry_reindex: txn_commit failed: %s (%d)\n", - db_strerror(rc), rc )); + db_strerror(rc), rc, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_reindex: txn_commit failed: %s (%d)\n", @@ -361,9 +356,9 @@ done: } else { TXN_ABORT( tid ); #ifdef NEW_LOGGING - LDAP_LOG (( "tools", LDAP_LEVEL_DETAIL1, + LDAP_LOG ( TOOLS, DETAIL1, "=> bdb_tool_entry_reindex: txn_aborted! %s (%d)\n", - db_strerror(rc), rc )); + db_strerror(rc), rc, 0 ); #else Debug( LDAP_DEBUG_ANY, "=> bdb_tool_entry_reindex: txn_aborted! %s (%d)\n",