Blame SOURCES/0092-Ticket-48808-Paged-results-search-returns-the-blank-.patch

f5000e
From 39a14eaab84e7eac940d1d707cabc9610ef570c6 Mon Sep 17 00:00:00 2001
f5000e
From: Noriko Hosoi <nhosoi@redhat.com>
f5000e
Date: Tue, 26 Apr 2016 13:53:02 -0700
f5000e
Subject: [PATCH 92/93] Ticket #48808 - Paged results search returns the blank
f5000e
 list of entries
f5000e
f5000e
Bug Description: When a simple paged results slot in a connection is
f5000e
discarded due to an error, e.g., SIZELIMIT_EXCEEDED, the slot was not
f5000e
properly cleaned up.  Then, if the slot was reused, the leftover flag
f5000e
confused the code and ended up returning the 0 search result.
f5000e
f5000e
Fix Description: This patch adds the clean up code when a slot is re-
f5000e
used.
f5000e
f5000e
https://fedorahosted.org/389/ticket/48808
f5000e
f5000e
Reviewed by wibrown@redhat.com (Thank you, William!!)
f5000e
f5000e
(cherry picked from commit 09180b25570696d24c86e3a046fb497c15549c64)
f5000e
(cherry picked from commit a8486ab3b364a9ae088d6404d025058b04ac358d)
f5000e
---
f5000e
 ldap/servers/slapd/pagedresults.c | 1 +
f5000e
 1 file changed, 1 insertion(+)
f5000e
f5000e
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
f5000e
index d394dab..52d2158 100644
f5000e
--- a/ldap/servers/slapd/pagedresults.c
f5000e
+++ b/ldap/servers/slapd/pagedresults.c
f5000e
@@ -124,6 +124,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
f5000e
             prp = conn->c_pagedresults.prl_list;
f5000e
             for (i = 0; i < conn->c_pagedresults.prl_maxlen; i++, prp++) {
f5000e
                 if (!prp->pr_current_be) { /* unused slot; take it */
f5000e
+                    _pr_cleanup_one_slot(prp);
f5000e
                     prp->pr_current_be = be;
f5000e
                     *index = i;
f5000e
                     break;
f5000e
-- 
f5000e
2.4.11
f5000e