From 7420472b4228ca449cd2bb175e9827c3b2562f65 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 5 Apr 2006 18:20:00 +0000 Subject: [PATCH] warn in case of error --- tests/progs/slapd-read.c | 4 +++- tests/progs/slapd-search.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/progs/slapd-read.c b/tests/progs/slapd-read.c index 134b164184..9bece47cd1 100644 --- a/tests/progs/slapd-read.c +++ b/tests/progs/slapd-read.c @@ -245,10 +245,12 @@ do_random( char *uri, char *manager, struct berval *passwd, case LDAP_SUCCESS: nvalues = ldap_count_entries( ld, res ); if ( nvalues == 0 ) { + if ( rc ) { + tester_ldap_error( ld, "ldap_search_ext_s" ); + } break; } - values = malloc( ( nvalues + 1 ) * sizeof( char * ) ); for ( i = 0, e = ldap_first_entry( ld, res ); e != NULL; i++, e = ldap_next_entry( ld, e ) ) { diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c index 0f810d7a51..8504f32710 100644 --- a/tests/progs/slapd-search.c +++ b/tests/progs/slapd-search.c @@ -252,6 +252,9 @@ do_random( char *uri, char *manager, struct berval *passwd, case LDAP_TIMELIMIT_EXCEEDED: case LDAP_SUCCESS: if ( ldap_count_entries( ld, res ) == 0 ) { + if ( rc ) { + tester_ldap_error( ld, "ldap_search_ext_s" ); + } break; } -- 2.39.5