From db85e423d20736b7486f6e31a34b4307b9c3cccd Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 21 Jun 2004 18:40:20 +0000 Subject: [PATCH] fix response output --- clients/tools/ldapsearch.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 56834eb096..f8b21b34d6 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1044,8 +1044,12 @@ static int dosearch( case LDAP_RES_SEARCH_RESULT: rc = print_result( ld, msg, 1 ); #ifdef LDAP_CONTROL_PAGEDRESULTS - if ( rc == LDAP_SUCCESS && pageSize != 0 ) { - rc = parse_page_control( ld, msg, &cookie ); + if ( pageSize != 0 ) { + if ( rc == LDAP_SUCCESS ) { + rc = parse_page_control( ld, msg, &cookie ); + } else { + morePagedResults = 0; + } } #endif -- 2.39.5