]> git.sur5r.net Git - openldap/commitdiff
More cleanup
authorHoward Chu <hyc@openldap.org>
Thu, 6 Dec 2007 06:40:13 +0000 (06:40 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 6 Dec 2007 06:40:13 +0000 (06:40 +0000)
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/delete.c

index 52f939add43fb74256e5cccb562b8aee720e5c45..14ca178f6859b8f492c6f52d76f4c26ed58e065e 100644 (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 */
 
index e6b7f469536b033820ba6e6d85c6b3b7b01eb1ce..d666364e1dfe39efd82ba779d03db5ae8d150df0 100644 (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 );
index 3ec651b110c0e91e28e39b3ed8687307af4f475f..2e711cc846e02aeffb4818073eab5ce15e745067 100644 (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 ) {