Entry *e;
/* don't return more entries than requested by the client */
- if ( si->slimit && rs->sr_nentries >= si->slimit ) {
+ if ( si->slimit > 0 && rs->sr_nentries >= si->slimit ) {
si->slimit_exceeded = 1;
}
/* check for malformed entries: attrs with no values */
{
- Attribute *a = e->e_attrs;
+ Attribute *a = rs->sr_entry->e_attrs;
for (; a; a=a->a_next) {
if ( !a->a_numvals ) {
Debug( pcache_debug, "%s: query not cacheable because of attrs without values in DN \"%s\" (%s)\n",
si->slimit = 0;
si->slimit_exceeded = 0;
si->caching_reason = PC_IGNORE;
- if ( op->ors_slimit && op->ors_slimit < cm->num_entries_limit ) {
+ if ( op->ors_slimit > 0 && op->ors_slimit < cm->num_entries_limit ) {
si->slimit = op->ors_slimit;
op->ors_slimit = cm->num_entries_limit;
}