]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/search.c
ITS#3092: Rename sl_free() and friends to slap_sl_free()
[openldap] / servers / slapd / back-bdb / search.c
index 048364065b4b24fcdf61da041c1bca75c82aa67a..6261501258fd0e8ed3e3be6cab1742f8d5589630 100644 (file)
@@ -330,7 +330,7 @@ bdb_abandon( Operation *op, SlapReply *rs )
        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;
@@ -348,7 +348,7 @@ bdb_cancel( Operation *op, SlapReply *rs )
                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;
@@ -752,8 +752,8 @@ dn2entry_retry:
        }
 
        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 ) {
@@ -1121,22 +1121,6 @@ id2entry_retry:
                        }
 
                        if ( get_pagedresults(sop) ) {
-                               if ( sop->ors_limit     /* isroot == TRUE */
-                                               && sop->ors_limit->lms_s_pr_total > 0
-                                               && sop->ors_limit->lms_s_pr_total <= rs->sr_nentries + 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 );
@@ -1208,9 +1192,9 @@ id2entry_retry:
                                                        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;
                                                }
@@ -1244,9 +1228,9 @@ id2entry_retry:
                                                        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 */
@@ -1430,10 +1414,10 @@ nochange:
                                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 );  
                        }