Browse Source

513019 nsslapd-lookthroughlimit is not respected
When filter test is necessary against the search results and the test fails,
lookthroughcount attached to the search result structure should have been
decremented since the entry will not be sent to the client, but it was not.
This change fixes it.

Noriko Hosoi 16 years ago
parent
commit
1e3138f1d4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ldap/servers/slapd/back-ldbm/ldbm_search.c

+ 3 - 0
ldap/servers/slapd/back-ldbm/ldbm_search.c

@@ -1381,6 +1381,9 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
                   rc = SLAPI_FAIL_GENERAL;
                   goto bail;
               }
+              /* Since the filter test failed, the result won't be sent.
+               * sr_lookthroughcount should be decremented. */
+              --sr->sr_lookthroughcount;
           }
         }
     }