]> git.sur5r.net Git - openldap/commitdiff
fix response output
authorPierangelo Masarati <ando@openldap.org>
Mon, 21 Jun 2004 18:40:20 +0000 (18:40 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 21 Jun 2004 18:40:20 +0000 (18:40 +0000)
clients/tools/ldapsearch.c

index 56834eb0960a866963133c3c96b176acbbf150ec..f8b21b34d63649ffb373ce384a6aefe48dbfca49 100644 (file)
@@ -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