]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapsearch.c
do not prompt for next page in case of search failure
[openldap] / clients / tools / ldapsearch.c
index 84dddea57eb181ecc6c255637f6405a393f9406a..6f8d4a8ec0747ad30659c40f80fc32da8b8bbbb7 100644 (file)
@@ -837,7 +837,7 @@ getNextPage:
        }
 
 #ifdef LDAP_CONTROL_PAGEDRESULTS
-       if ( ( pageSize != 0 ) && ( morePagedResults != 0 ) ) {
+       if ( ( rc == LDAP_SUCCESS ) &&  ( pageSize != 0 ) && ( morePagedResults != 0 ) ) {
                char    buf[6];
                int     i, moreEntries, tmpSize;