fix testers (tnx to Luca)

This commit is contained in:
Pierangelo Masarati 2005-08-17 16:19:58 +00:00
parent 69c6cd5365
commit a583d1a9e5
2 changed files with 15 additions and 5 deletions

View File

@ -161,8 +161,8 @@ retry:;
switch ( rc ) {
case LDAP_BUSY:
case LDAP_UNAVAILABLE:
if ( do_retry == 1 ) {
do_retry = 0;
if ( do_retry > 0 ) {
do_retry--;
sleep( 1 );
goto retry;
}
@ -180,8 +180,8 @@ retry:;
filter, attrs, 0, &res );
if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_search" );
if ( rc == LDAP_BUSY && do_retry == 1 ) {
do_retry = 0;
if ( rc == LDAP_BUSY && do_retry > 0 ) {
do_retry--;
goto retry;
}
if ( rc != LDAP_NO_SUCH_OBJECT ) break;

View File

@ -71,7 +71,17 @@ static char argbuf[BUFSIZ];
static void
usage( char *name )
{
fprintf( stderr, "usage: %s -H <uri> | ([-h <host>] -p <port>) -D <manager> -w <passwd> -d <datadir> [-j <maxchild>] [-l <loops>] -P <progdir>\n", name );
fprintf( stderr,
"usage: %s "
"-H <uri> | ([-h <host>] -p <port>) "
"-D <manager> "
"-w <passwd> "
"-d <datadir> "
"[-j <maxchild>] "
"[-l <loops>] "
"-P <progdir> "
"[-r <maxretries>]\n",
name );
exit( EXIT_FAILURE );
}