]> git.sur5r.net Git - openldap/commitdiff
parse page control only in case of succes...
authorPierangelo Masarati <ando@openldap.org>
Mon, 21 Jun 2004 16:46:41 +0000 (16:46 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 21 Jun 2004 16:46:41 +0000 (16:46 +0000)
clients/tools/ldapsearch.c

index d1ec9dc0c0a60ae86c19db54818c3b29ef848c75..56834eb0960a866963133c3c96b176acbbf150ec 100644 (file)
@@ -1044,7 +1044,7 @@ static int dosearch(
                        case LDAP_RES_SEARCH_RESULT:
                                rc = print_result( ld, msg, 1 );
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-                               if ( pageSize != 0 ) { 
+                               if ( rc == LDAP_SUCCESS && pageSize != 0 ) { 
                                        rc = parse_page_control( ld, msg, &cookie );
                                }
 #endif