mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#5230 fix slimit for rootDN w/pagedresults
This commit is contained in:
parent
2701782cba
commit
33162c1aef
@ -1118,6 +1118,18 @@ limits_check( Operation *op, SlapReply *rs )
|
||||
op->ors_slimit = SLAP_NO_LIMIT;
|
||||
}
|
||||
|
||||
/* if paged results and slimit are requested */
|
||||
if ( get_pagedresults( op ) > SLAP_CONTROL_IGNORED &&
|
||||
op->ors_slimit != SLAP_NO_LIMIT ) {
|
||||
PagedResultsState *ps = op->o_pagedresults_state;
|
||||
int total = op->ors_slimit - ps->ps_count;
|
||||
if ( total > 0 ) {
|
||||
op->ors_slimit = total;
|
||||
} else {
|
||||
op->ors_slimit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* if not root, get appropriate limits */
|
||||
} else {
|
||||
( void ) limits_get( op, &op->o_ndn, &op->ors_limit );
|
||||
|
Loading…
Reference in New Issue
Block a user