mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
cleanup limits for internal searches...
This commit is contained in:
parent
b2226f75c4
commit
97f96aaaa6
@ -993,11 +993,18 @@ limits_check( Operation *op, SlapReply *rs )
|
||||
{
|
||||
assert( op );
|
||||
assert( rs );
|
||||
/* protocol only allows 0..maxInt */
|
||||
assert( op->ors_tlimit >= 0 );
|
||||
assert( op->ors_slimit >= 0 );
|
||||
/* FIXME: should this be always true? */
|
||||
assert( op->o_tag == LDAP_REQ_SEARCH);
|
||||
|
||||
/* protocol only allows 0..maxInt; internal searches
|
||||
* may use SLAP_NO_LIMIT ( = -1 ) to indicate no limits... */
|
||||
if ( op->ors_tlimit == SLAP_NO_LIMIT && op->ors_slimit == SLAP_NO_LIMIT ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* fail when at least one is set to a negative value... */
|
||||
assert( op->ors_tlimit >= 0 );
|
||||
assert( op->ors_slimit >= 0 );
|
||||
|
||||
/* allow root to set no limit */
|
||||
if ( be_isroot( op ) ) {
|
||||
|
@ -1142,6 +1142,9 @@ syncrepl_entry(
|
||||
op->o_req_dn = si->si_base;
|
||||
op->o_req_ndn = si->si_base;
|
||||
|
||||
op->ors_tlimit = 0;
|
||||
op->ors_slimit = 0;
|
||||
|
||||
/* set callback function */
|
||||
op->o_callback = &cb;
|
||||
cb.sc_response = dn_callback;
|
||||
|
Loading…
Reference in New Issue
Block a user