]> git.sur5r.net Git - openldap/commitdiff
More BDB_PSEARCH cleanup
authorHoward Chu <hyc@openldap.org>
Fri, 26 Nov 2004 09:39:33 +0000 (09:39 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 26 Nov 2004 09:39:33 +0000 (09:39 +0000)
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/ctxcsn.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-bdb/search.c

index c2cd496f8fab1c44e41b5b53e4aa9c538f8ae891..40e9879b4bc3d470f8b99710999291acadfcf7fb 100644 (file)
@@ -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 ) {
index f0a04117d9eb5af0836b487bb00fa81236df7870..db57b902ae31f14b5bf6a1f8a907e7daf9bbfb01 100644 (file)
@@ -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
index a78d14fbaab4c24c912c2a4aeca4e1f530624ebf..59b4d90e72d7d1d787d8af117c72a1a67fc26181 100644 (file)
@@ -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 ) {
index b0bddbe694c5d0088c453b269afe5f54e3e87416..6b2a6c7d4b289ab8e3be96c54b78f09b867f2495 100644 (file)
@@ -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 ) {
index ae1fc73151255e3c46c45f4e1ace2aa262d25294..6349db8b06f0cb968e6f62e1ce9a96d55736805d 100644 (file)
@@ -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 ) {
index 697e697eeb35da9e16e8c5ae04a79add0a334d51..0c99ffddbc4aea4d3013b5a6b50e599ffc981004 100644 (file)
@@ -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 )