More cleanup

This commit is contained in:
Howard Chu 2007-12-06 06:40:13 +00:00
parent ebbb6ab216
commit 7a3f73efd8
3 changed files with 9 additions and 11 deletions

View File

@ -320,16 +320,16 @@ struct bdb_op_info {
/* env->log_printf appeared in 4.4 */
#if DB_VERSION_FULL >= 0x04040000
#define LOG_PRINTF(env,txn,fmt,...) (env)->log_printf((env),(txn),(fmt),__VA_ARGS__)
#define BDB_LOG_PRINTF(env,txn,fmt,...) (env)->log_printf((env),(txn),(fmt),__VA_ARGS__)
#else
extern int __db_logmsg(const DB_ENV *env, DB_TXN *txn, const char *op, u_int32_t flags,
const char *fmt,...);
#define LOG_PRINTF(env,txn,fmt,...) __db_logmsg((env),(txn),"DIAGNOSTIC",0,(fmt),__VA_ARGS__)
#define BDB_LOG_PRINTF(env,txn,fmt,...) __db_logmsg((env),(txn),"DIAGNOSTIC",0,(fmt),__VA_ARGS__)
#endif
#else /* !BDB_LOG_DEBUG */
#define LOG_PRINTF(a,b,c,...)
#define BDB_LOG_PRINTF(a,b,c,...)
#endif /* BDB_LOG_DEBUG */

View File

@ -431,7 +431,7 @@ bdb_cache_find_ndn(
(ei.bei_nrdn.bv_val - ndn->bv_val);
bdb_cache_entryinfo_unlock( eip );
LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Reading %s",
BDB_LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Reading %s",
ei.bei_nrdn.bv_val );
lock.mode = DB_LOCK_NG;
@ -443,14 +443,12 @@ bdb_cache_find_ndn(
return rc;
}
LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Read got %s(%d)",
BDB_LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Read got %s(%d)",
ei.bei_nrdn.bv_val, ei.bei_id );
/* DN exists but needs to be added to cache */
ei.bei_nrdn.bv_len = len;
rc = bdb_entryinfo_add_internal( bdb, &ei, &ei2 );
Debug( LDAP_DEBUG_TRACE, "add_internal: \"%s\" %d\n",
ei.bei_nrdn.bv_val, ei.bei_id, 0 );
/* add_internal left eip and c_rwlock locked */
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_cache.c_rwlock );
bdb_cache_entry_db_unlock( bdb, &lock );

View File

@ -372,7 +372,7 @@ retry: /* transaction retry */
goto return_results;
}
LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Starting delete %s(%d)",
BDB_LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Starting delete %s(%d)",
e->e_nname.bv_val, e->e_id );
/* Can't do it if we have kids */
@ -495,7 +495,7 @@ retry: /* transaction retry */
p = NULL;
}
LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Commit1 delete %s(%d)",
BDB_LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Commit1 delete %s(%d)",
e->e_nname.bv_val, e->e_id );
if ( TXN_COMMIT( lt2, 0 ) != 0 ) {
@ -524,7 +524,7 @@ retry: /* transaction retry */
}
} else {
LOG_PRINTF( bdb->bi_dbenv, ltid, "slapd Cache delete %s(%d)",
BDB_LOG_PRINTF( bdb->bi_dbenv, ltid, "slapd Cache delete %s(%d)",
e->e_nname.bv_val, e->e_id );
rc = bdb_cache_delete( bdb, e, locker, &lock );
@ -539,7 +539,7 @@ retry: /* transaction retry */
ltid = NULL;
op->o_private = NULL;
LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Committed delete %s(%d)",
BDB_LOG_PRINTF( bdb->bi_dbenv, NULL, "slapd Committed delete %s(%d)",
e->e_nname.bv_val, e->e_id );
if( rs->sr_err != 0 ) {