warn in case of error

This commit is contained in:
Pierangelo Masarati 2006-04-05 18:20:00 +00:00
parent ffc69eadde
commit 7420472b42
2 changed files with 6 additions and 1 deletions

View File

@ -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 ) )
{

View File

@ -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;
}