From 55e8763433b2f0740dcdce503b4c7301bf62ad06 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 12 Feb 2008 20:59:20 +0000 Subject: [PATCH] More for ITS#5317 --- clients/tools/ldapsearch.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 ) { -- 2.39.5