From: Pierangelo Masarati Date: Mon, 21 Jun 2004 18:40:20 +0000 (+0000) Subject: fix response output X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~201 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=db85e423d20736b7486f6e31a34b4307b9c3cccd;p=openldap fix response output --- 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