mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
fix testers (tnx to Luca)
This commit is contained in:
parent
69c6cd5365
commit
a583d1a9e5
@ -161,8 +161,8 @@ retry:;
|
|||||||
switch ( rc ) {
|
switch ( rc ) {
|
||||||
case LDAP_BUSY:
|
case LDAP_BUSY:
|
||||||
case LDAP_UNAVAILABLE:
|
case LDAP_UNAVAILABLE:
|
||||||
if ( do_retry == 1 ) {
|
if ( do_retry > 0 ) {
|
||||||
do_retry = 0;
|
do_retry--;
|
||||||
sleep( 1 );
|
sleep( 1 );
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
@ -180,8 +180,8 @@ retry:;
|
|||||||
filter, attrs, 0, &res );
|
filter, attrs, 0, &res );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
ldap_perror( ld, "ldap_search" );
|
ldap_perror( ld, "ldap_search" );
|
||||||
if ( rc == LDAP_BUSY && do_retry == 1 ) {
|
if ( rc == LDAP_BUSY && do_retry > 0 ) {
|
||||||
do_retry = 0;
|
do_retry--;
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
|
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
|
||||||
|
@ -71,7 +71,17 @@ static char argbuf[BUFSIZ];
|
|||||||
static void
|
static void
|
||||||
usage( char *name )
|
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 );
|
exit( EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user