ps = bdb_drop_psearch( op, op->oq_abandon.rs_msgid );
if ( ps ) {
if ( ps->o_tmpmemctx ) {
- sl_mem_destroy( NULL, ps->o_tmpmemctx );
+ slap_sl_mem_destroy( NULL, ps->o_tmpmemctx );
}
slap_op_free ( ps );
return LDAP_SUCCESS;
rs->sr_err = LDAP_CANCELLED;
send_ldap_result( ps, rs );
if ( ps->o_tmpmemctx ) {
- sl_mem_destroy( NULL, ps->o_tmpmemctx );
+ slap_sl_mem_destroy( NULL, ps->o_tmpmemctx );
}
slap_op_free ( ps );
return LDAP_SUCCESS;
}
if ( get_pagedresults(sop) ) {
- if ( sop->o_pagedresults_state.ps_cookie == 0 ) {
- id = 0;
+ if ( (ID)( sop->o_pagedresults_state.ps_cookie ) == 0 ) {
+ id = bdb_idl_first( candidates, &cursor );
} else {
if ( sop->o_pagedresults_size == 0 ) {
}
if ( get_pagedresults(sop) ) {
- if ( sop->ors_limit /* isroot == TRUE */
- && sop->ors_slimit < sop->o_pagedresults_state.ps_count ) {
- if (!IS_PSEARCH) {
- bdb_cache_return_entry_r( bdb->bi_dbenv,
- &bdb->bi_cache, e, &lock );
- }
- e = NULL;
- rs->sr_entry = NULL;
- rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
- rs->sr_ref = rs->sr_v2ref;
- send_ldap_result( sop, rs );
- rs->sr_err = LDAP_SUCCESS;
- goto done;
- }
-
if ( rs->sr_nentries >= sop->o_pagedresults_size ) {
send_pagerequest_response( sop, rs,
lastid, tentries );
rs->sr_flags = 0;
result = send_search_entry( sop, rs );
if ( cookie.bv_val ) ch_free( cookie.bv_val );
- sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val,
+ slap_sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val,
sop->o_tmpmemctx );
- sl_free( ctrls[--num_ctrls], sop->o_tmpmemctx );
+ slap_sl_free( ctrls[--num_ctrls], sop->o_tmpmemctx );
ctrls[num_ctrls] = NULL;
rs->sr_ctrls = NULL;
}
rs->sr_attrs = sop->oq_search.rs_attrs;
rs->sr_flags = 0;
result = send_search_entry( sop, rs );
- sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val,
+ slap_sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val,
sop->o_tmpmemctx );
- sl_free( ctrls[--num_ctrls], sop->o_tmpmemctx );
+ slap_sl_free( ctrls[--num_ctrls], sop->o_tmpmemctx );
ctrls[num_ctrls] = NULL;
rs->sr_ctrls = NULL;
} else { /* PRESENT */
rs->sr_rspoid = NULL;
send_ldap_result( sop, rs );
if ( ctrls[num_ctrls-1]->ldctl_value.bv_val != NULL ) {
- sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val,
+ slap_sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val,
sop->o_tmpmemctx );
}
- sl_free( ctrls[--num_ctrls], sop->o_tmpmemctx );
+ slap_sl_free( ctrls[--num_ctrls], sop->o_tmpmemctx );
ctrls[num_ctrls] = NULL;
if ( cookie.bv_val ) ch_free( cookie.bv_val );
}