1
0
Эх сурвалжийг харах

Ticket 48928 log of page result cookie should log empty cookie with a different value than 0

Bug Description:
    With the ticket https://fedorahosted.org/389/ticket/48752, the cookie value
    is logged with each page result RESULT.
    When the page result is completed (no more entry to return), the returned cookie is 'pr_cookie=0'.
    Else the cookie value is logged 'pr_cookie=<internal index>'. Unfortunately the index ranges [0..N].

    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.

Fix Description:
    Log the empty cookie with a value '-1'

https://fedorahosted.org/389/ticket/48928

Reviewed by: Noriko Hosoi, Simon Pichugin (thanks !!!!)

Platforms tested: F23

Flag Day: no

Doc impact: no
Thierry Bordaz 9 жил өмнө
parent
commit
73ff835f29

+ 1 - 1
ldap/servers/slapd/pagedresults.c

@@ -247,7 +247,7 @@ pagedresults_set_response_control( Slapi_PBlock *pb, int iscritical,
 
     /* begin sequence, payload, end sequence */
     if (current_search_count < 0) {
-        cookie = 0;
+        cookie = -1;
         cookie_str = slapi_ch_strdup("");
     } else {
         cookie = index;