From: Quanah Gibson-Mount Date: Tue, 12 Feb 2008 20:59:20 +0000 (+0000) Subject: More for ITS#5317 X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~155 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=55e8763433b2f0740dcdce503b4c7301bf62ad06;p=openldap More for ITS#5317 --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index b82c71cc49..d570036298 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -625,7 +625,7 @@ main( int argc, char **argv ) { char *filtpattern, **attrs = NULL, line[BUFSIZ]; FILE *fp = NULL; - int rc, i, first; + int rc, rc1, i, first; LDAP *ld = NULL; BerElement *seber = NULL, *vrber = NULL; @@ -990,11 +990,13 @@ getNextPage: } else { first = 0; } - rc = dosearch( ld, base, scope, filtpattern, line, + rc1 = dosearch( ld, base, scope, filtpattern, line, attrs, attrsonly, NULL, NULL, NULL, -1 ); - if ( rc != 0 && !contoper ) { - break; + if ( rc1 != 0 ) { + rc = rc1; + if ( !contoper ) + break; } } if ( fp != stdin ) {