Fix prev commit, must test filter on cleanup

This commit is contained in:
Howard Chu 2007-12-14 20:24:31 +00:00
parent f84a67ef34
commit b96a96c598

View File

@ -993,13 +993,19 @@ static int translucent_search(Operation *op, SlapReply *rs) {
av = tavl_end( tc.list, TAVL_DIR_LEFT ); av = tavl_end( tc.list, TAVL_DIR_LEFT );
while ( av ) { while ( av ) {
rs->sr_flags = REP_ENTRY_MUSTBEFREED;
rs->sr_entry = av->avl_data; rs->sr_entry = av->avl_data;
rc = test_filter( op, rs->sr_entry, op->ors_filter );
if ( rc == LDAP_COMPARE_TRUE ) {
rs->sr_flags = REP_ENTRY_MUSTBEFREED;
rc = send_search_entry( op, rs ); rc = send_search_entry( op, rs );
if ( rc ) break; if ( rc ) break;
} else {
entry_free( rs->sr_entry );
}
av = tavl_next( av, TAVL_DIR_RIGHT ); av = tavl_next( av, TAVL_DIR_RIGHT );
} }
tavl_free( tc.list, NULL ); tavl_free( tc.list, NULL );
rs->sr_entry = NULL;
} }
send_ldap_result( op, rs ); send_ldap_result( op, rs );
} }