From aa9627e61c099b4665e540e4c3be6b53d75950e3 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Jun 2004 23:07:56 +0000 Subject: [PATCH] Don't return useless estimate. --- servers/slapd/back-bdb/search.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 2737d1fb82..2da62c485a 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -1713,8 +1713,8 @@ send_paged_response( LDAPControl ctrl, *ctrls[2]; BerElementBuffer berbuf; BerElement *ber = (BerElement *)&berbuf; - struct berval cookie = BER_BVC( "" ); PagedResultsCookie respcookie; + struct berval cookie; #ifdef NEW_LOGGING LDAP_LOG ( OPERATION, ENTRY, @@ -1739,17 +1739,16 @@ send_paged_response( } else { respcookie = ( PagedResultsCookie )0; + cookie.bv_val = ""; + cookie.bv_len = 0; } op->o_conn->c_pagedresults_state.ps_cookie = respcookie; op->o_conn->c_pagedresults_state.ps_count = op->o_pagedresults_state.ps_count + rs->sr_nentries; - /* - * FIXME: we should consider sending an estimate of the entries - * left, after appropriate security check is done - */ - ber_printf( ber, "{iO}", tentries, &cookie ); + /* return size of 0 -- no estimate */ + ber_printf( ber, "{iO}", 0, &cookie ); if ( ber_flatten2( ber, &ctrls[0]->ldctl_value, 0 ) == -1 ) { goto done; -- 2.39.5