From: Howard Chu Date: Fri, 26 Nov 2004 09:39:33 +0000 (+0000) Subject: More BDB_PSEARCH cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~219 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3426a11983c28f7ee9846c3b2ed71c8388228148;p=openldap More BDB_PSEARCH cleanup --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index c2cd496f8f..40e9879b4b 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -367,6 +367,7 @@ retry: /* transaction retry */ goto return_results; } +#ifdef BDB_PSEARCH if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) { rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei, &ctxcsn_e, &ctxcsn_added, locker ); @@ -377,6 +378,7 @@ retry: /* transaction retry */ goto retry; } } +#endif /* post-read */ if( op->o_postread ) { diff --git a/servers/slapd/back-bdb/ctxcsn.c b/servers/slapd/back-bdb/ctxcsn.c index f0a04117d9..db57b902ae 100644 --- a/servers/slapd/back-bdb/ctxcsn.c +++ b/servers/slapd/back-bdb/ctxcsn.c @@ -25,6 +25,7 @@ #include "lutil.h" #include "back-bdb.h" +#ifdef BDB_PSEARCH int bdb_csn_commit( Operation *op, @@ -439,3 +440,4 @@ done: return rs->sr_err; } +#endif diff --git a/servers/slapd/back-bdb/delete.c b/servers/slapd/back-bdb/delete.c index a78d14fbaa..59b4d90e72 100644 --- a/servers/slapd/back-bdb/delete.c +++ b/servers/slapd/back-bdb/delete.c @@ -482,6 +482,7 @@ retry: /* transaction retry */ ldap_pvt_thread_mutex_unlock( &bdb->bi_lastid_mutex ); #endif +#ifdef BDB_PSEARCH if ( !dn_match( &ctxcsn_ndn, &op->o_req_ndn ) && !be_issuffix( op->o_bd, &op->o_req_ndn ) && LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) { @@ -494,6 +495,7 @@ retry: /* transaction retry */ goto retry; } } +#endif if( op->o_noop ) { if ( ( rs->sr_err = TXN_ABORT( ltid ) ) != 0 ) { diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index b0bddbe694..6b2a6c7d4b 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -537,6 +537,7 @@ retry: /* transaction retry */ goto return_results; } +#ifdef BDB_PSEARCH if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) { rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei, &ctxcsn_e, &ctxcsn_added, locker ); @@ -547,6 +548,7 @@ retry: /* transaction retry */ goto retry; } } +#endif if( op->o_postread ) { if( postread_ctrl == NULL ) { diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index ae1fc73151..6349db8b06 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -805,6 +805,7 @@ retry: /* transaction retry */ goto return_results; } +#ifdef BDB_PSEARCH if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) { rc = bdb_csn_commit( op, rs, ltid, ei, &suffix_ei, &ctxcsn_e, &ctxcsn_added, locker ); @@ -815,6 +816,7 @@ retry: /* transaction retry */ goto retry; } } +#endif if( op->o_postread ) { if( postread_ctrl == NULL ) { diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 697e697eeb..0c99ffddbc 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -1870,9 +1870,6 @@ done: bdb_cache_return_entry_r( bdb->bi_dbenv, &bdb->bi_cache, e, &lock ); } ber_bvfree( search_context_csn ); - -#else - bdb_cache_return_entry_r( bdb->bi_dbenv, &bdb->bi_cache, e, &lock ); #endif if ( !opinfo )