From 0c0b29fc85835662bb04b7c4f039c8ba24ee4d93 Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Wed, 31 Dec 2003 22:11:38 +0000 Subject: [PATCH] a patch for persistent search --- servers/slapd/back-bdb/add.c | 3 ++- servers/slapd/back-bdb/search.c | 11 +++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 33916c7bab..f3a6281b1c 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -496,8 +496,9 @@ retry: /* transaction retry */ if ( rs->sr_err == LDAP_SUCCESS && !op->o_no_psearch ) { ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock ); + assert( BEI(e) ); LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) { - bdb_psearch( op, rs, ps_list, op->oq_add.rs_e, + bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_ADD ); } ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock ); diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 0772cca908..6018d16d97 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -997,9 +997,6 @@ id2entry_retry: } else { e = ps_e; } -#if 0 - assert( BEI(e) ); -#endif rs->sr_entry = e; @@ -1053,15 +1050,13 @@ id2entry_retry: if ( id == base.e_id ) break; /* Fall-thru */ case LDAP_SCOPE_SUBTREE: { - EntryInfo *tmp = BEI(e); - if ( tmp ) for (; tmp->bei_parent; tmp = tmp->bei_parent ) { + EntryInfo *tmp; + for (tmp = BEI(e); tmp->bei_parent; + tmp = tmp->bei_parent ) { if ( tmp->bei_id == base.e_id ) { scopeok = 1; break; } - } else { - /* FIXME */ - scopeok = 1; } } break; } -- 2.39.5