Skip to content
Snippets Groups Projects
Commit 7420472b authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

warn in case of error

parent ffc69ead
No related branches found
No related tags found
No related merge requests found
......@@ -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 ) )
{
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment