]> git.sur5r.net Git - openldap/commitdiff
ITS#7081 fix prev commit
authorHoward Chu <hyc@openldap.org>
Fri, 4 Nov 2011 18:32:38 +0000 (11:32 -0700)
committerHoward Chu <hyc@openldap.org>
Fri, 4 Nov 2011 18:32:38 +0000 (11:32 -0700)
servers/slapd/overlays/pcache.c

index 2af2f068407513f2acb344b5d07cc77705decdb4..8788378a3033440c930e7fbe70bf2e384b9b7a83 100644 (file)
@@ -2448,9 +2448,6 @@ pcache_response(
                if ( si->slimit > 0 && rs->sr_nentries >= si->slimit ) {
                        si->slimit_exceeded = 1;
                }
-               if ( si->slimit_exceeded ) {
-                       return 0;
-               }
 
                /* If we haven't exceeded the limit for this query,
                 * build a chain of answers to store. If we hit the
@@ -2500,6 +2497,9 @@ over:;
                                si->tail = NULL;
                        }
                }
+               if ( si->slimit_exceeded ) {
+                       return 0;
+               }
        } else if ( rs->sr_type == REP_RESULT ) {
 
                if ( si->count ) {