cleanup limits for internal searches...

This commit is contained in:
Pierangelo Masarati 2004-06-19 17:07:36 +00:00
parent b2226f75c4
commit 97f96aaaa6
2 changed files with 13 additions and 3 deletions

View File

@ -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 ) ) {

View File

@ -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;