From: Pierangelo Masarati Date: Wed, 17 Aug 2005 16:19:58 +0000 (+0000) Subject: fix testers (tnx to Luca) X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~685 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a583d1a9e514bc26f52abef59183b52d66910624;p=openldap fix testers (tnx to Luca) --- diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c index 25488b816c..7158831056 100644 --- a/tests/progs/slapd-search.c +++ b/tests/progs/slapd-search.c @@ -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; diff --git a/tests/progs/slapd-tester.c b/tests/progs/slapd-tester.c index 7d14de72c6..4121b4d174 100644 --- a/tests/progs/slapd-tester.c +++ b/tests/progs/slapd-tester.c @@ -71,7 +71,17 @@ static char argbuf[BUFSIZ]; static void usage( char *name ) { - fprintf( stderr, "usage: %s -H | ([-h ] -p ) -D -w -d [-j ] [-l ] -P \n", name ); + fprintf( stderr, + "usage: %s " + "-H | ([-h ] -p ) " + "-D " + "-w " + "-d " + "[-j ] " + "[-l ] " + "-P " + "[-r ]\n", + name ); exit( EXIT_FAILURE ); }