]> git.sur5r.net Git - openldap/commitdiff
Exit if no values returned in do_random
authorHoward Chu <hyc@openldap.org>
Tue, 13 Feb 2007 11:25:51 +0000 (11:25 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 13 Feb 2007 11:25:51 +0000 (11:25 +0000)
tests/progs/slapd-search.c

index d18ae8dc141625b431bb80e8619ab48ce4900993..e0b6b1d5c56c43031b86b3fb6c27260d30654b00 100644 (file)
@@ -295,6 +295,12 @@ do_random( char *uri, char *manager, struct berval *passwd,
 
                ldap_msgfree( res );
 
+               if ( !values ) {
+                       fprintf( stderr, "  PID=%ld - Search base=\"%s\" filter=\"%s\" got %d values.\n",
+                               (long) pid, sbase, filter, nvalues );
+                       exit(EXIT_FAIL);
+               }
+
                if ( do_retry == maxretries ) {
                        fprintf( stderr, "  PID=%ld - Search base=\"%s\" filter=\"%s\" got %d values.\n",
                                (long) pid, sbase, filter, nvalues );