|
|
7c7f29 |
From f6f6340afaea6f26d188f875b15f966e03cb7f50 Mon Sep 17 00:00:00 2001
|
|
|
7c7f29 |
From: Thierry Bordaz <tbordaz@redhat.com>
|
|
|
7c7f29 |
Date: Mon, 18 Jul 2016 18:30:28 +0200
|
|
|
7c7f29 |
Subject: [PATCH 17/29] Ticket 48928 log of page result cookie should log empty
|
|
|
7c7f29 |
cookie with a different value than 0
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Bug Description:
|
|
|
7c7f29 |
With the ticket https://fedorahosted.org/389/ticket/48752, the cookie value
|
|
|
7c7f29 |
is logged with each page result RESULT.
|
|
|
7c7f29 |
When the page result is completed (no more entry to return), the returned cookie is 'pr_cookie=0'.
|
|
|
7c7f29 |
Else the cookie value is logged 'pr_cookie=<internal index>'. Unfortunately the index ranges [0..N].
|
|
|
7c7f29 |
|
|
|
7c7f29 |
So when the value pr_cookie=0 is logged, it is not possible to know if it is an empty cookie or a valid cookie with the value 0.
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Fix Description:
|
|
|
7c7f29 |
Log the empty cookie with a value '-1'
|
|
|
7c7f29 |
|
|
|
7c7f29 |
https://fedorahosted.org/389/ticket/48928
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Reviewed by: Noriko Hosoi, Simon Pichugin (thanks !!!!)
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Platforms tested: F23
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Flag Day: no
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Doc impact: no
|
|
|
7c7f29 |
|
|
|
7c7f29 |
(cherry picked from commit 73ff835f29514e33433de9f2be74f73efe6943ce)
|
|
|
7c7f29 |
---
|
|
|
7c7f29 |
ldap/servers/slapd/pagedresults.c | 2 +-
|
|
|
7c7f29 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
7c7f29 |
|
|
|
7c7f29 |
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
|
|
|
7c7f29 |
index 07a7b69..6fec344 100644
|
|
|
7c7f29 |
--- a/ldap/servers/slapd/pagedresults.c
|
|
|
7c7f29 |
+++ b/ldap/servers/slapd/pagedresults.c
|
|
|
7c7f29 |
@@ -247,7 +247,7 @@ pagedresults_set_response_control( Slapi_PBlock *pb, int iscritical,
|
|
|
7c7f29 |
|
|
|
7c7f29 |
/* begin sequence, payload, end sequence */
|
|
|
7c7f29 |
if (current_search_count < 0) {
|
|
|
7c7f29 |
- cookie = 0;
|
|
|
7c7f29 |
+ cookie = -1;
|
|
|
7c7f29 |
cookie_str = slapi_ch_strdup("");
|
|
|
7c7f29 |
} else {
|
|
|
7c7f29 |
cookie = index;
|
|
|
7c7f29 |
--
|
|
|
7c7f29 |
2.4.11
|
|
|
7c7f29 |
|